diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index f41b155c..f1009d47 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -4901,7 +4901,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); , 0 , src.m_ptr , srcZ*src.m_numMips+blit.m_srcMip - , &box + , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &box ); } } diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 8fe2a7a4..951edf3f 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -3649,9 +3649,9 @@ namespace bgfx { namespace d3d9 // GetRenderTargetData (dst must be SYSTEMMEM) HRESULT hr = m_device->StretchRect(srcSurface - , &srcRect + , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &srcRect , dstSurface - , &dstRect + , isDepth((TextureFormat::Enum)src.m_textureFormat) ? NULL : &dstRect , D3DTEXF_NONE ); if (FAILED(hr) )