Merge pull request #576 from andr3wmac/depth_blit_fix

Fix blit for depth textures.
This commit is contained in:
Branimir Karadžić 2015-11-19 20:10:00 -08:00
commit 28ae783664
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) )