Fix blit for depth textures.

This commit is contained in:
Andrew Mac 2015-11-19 22:51:58 -04:00
parent 906c8cb255
commit 120ed1c52f
2 changed files with 3 additions and 3 deletions

View file

@ -4901,7 +4901,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
, 0 , 0
, src.m_ptr , src.m_ptr
, srcZ*src.m_numMips+blit.m_srcMip , srcZ*src.m_numMips+blit.m_srcMip
, &box , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &box
); );
} }
} }

View file

@ -3649,9 +3649,9 @@ namespace bgfx { namespace d3d9
// GetRenderTargetData (dst must be SYSTEMMEM) // GetRenderTargetData (dst must be SYSTEMMEM)
HRESULT hr = m_device->StretchRect(srcSurface HRESULT hr = m_device->StretchRect(srcSurface
, &srcRect , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &srcRect
, dstSurface , dstSurface
, &dstRect , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &dstRect
, D3DTEXF_NONE , D3DTEXF_NONE
); );
if (FAILED(hr) ) if (FAILED(hr) )