D3D9: Fixed cubemap framebuffer.
This commit is contained in:
parent
051164a091
commit
4e4af5983a
@ -3072,9 +3072,11 @@ namespace bgfx { namespace d3d9
|
||||
|
||||
m_num = 0;
|
||||
m_needResolve = false;
|
||||
memcpy(m_attachment, _attachment, _num*sizeof(Attachment) );
|
||||
|
||||
for (uint32_t ii = 0; ii < _num; ++ii)
|
||||
{
|
||||
TextureHandle handle = _attachment[ii].handle;
|
||||
TextureHandle handle = m_attachment[ii].handle;
|
||||
if (isValid(handle) )
|
||||
{
|
||||
const TextureD3D9& texture = s_renderD3D9->m_textures[handle.idx];
|
||||
@ -3102,12 +3104,17 @@ namespace bgfx { namespace d3d9
|
||||
}
|
||||
else
|
||||
{
|
||||
m_color[m_num] = texture.getSurface(uint8_t(_attachment[ii].layer) );
|
||||
m_color[m_num] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) );
|
||||
m_attachment[m_num].layer = m_attachment[ii].layer;
|
||||
m_attachment[m_num].mip = m_attachment[ii].mip;
|
||||
}
|
||||
m_num++;
|
||||
}
|
||||
|
||||
m_needResolve |= (NULL != texture.m_surface) && (NULL != texture.m_texture2d);
|
||||
m_needResolve |= true
|
||||
&& (NULL != texture.m_surface)
|
||||
&& (NULL != texture.m_texture2d)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3290,7 +3297,7 @@ namespace bgfx { namespace d3d9
|
||||
}
|
||||
else
|
||||
{
|
||||
m_color[ii] = texture.getSurface();
|
||||
m_color[ii] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -407,6 +407,7 @@ namespace bgfx { namespace d3d9
|
||||
|
||||
TextureHandle m_colorHandle[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS-1];
|
||||
TextureHandle m_depthHandle;
|
||||
Attachment m_attachment[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS];
|
||||
uint16_t m_denseIdx;
|
||||
uint8_t m_num;
|
||||
bool m_needResolve;
|
||||
|
Loading…
x
Reference in New Issue
Block a user