diff options
Diffstat (limited to '3rdparty/bgfx/src/renderer_d3d9.cpp')
| -rw-r--r-- | 3rdparty/bgfx/src/renderer_d3d9.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index d95d7d93a00..58e45db9032 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -2982,11 +2982,11 @@ namespace bgfx { namespace d3d9 switch (m_textureFormat) { case TextureFormat::RGB5A1: - imageConvert(bits, 16, packBgr5a1, mip.m_data, unpackRgb5a1, size); + imageConvert(bits, 16, bx::packBgr5a1, mip.m_data, bx::unpackRgb5a1, size); break; case TextureFormat::RGBA4: - imageConvert(bits, 16, packBgra4, mip.m_data, unpackRgba4, size); + imageConvert(bits, 16, bx::packBgra4, mip.m_data, bx::unpackRgba4, size); break; default: @@ -3044,11 +3044,11 @@ namespace bgfx { namespace d3d9 switch (m_textureFormat) { case TextureFormat::RGB5A1: - imageConvert(dst, 16, packBgr5a1, src, unpackRgb5a1, rectpitch); + imageConvert(dst, 16, bx::packBgr5a1, src, bx::unpackRgb5a1, rectpitch); break; case TextureFormat::RGBA4: - imageConvert(dst, 16, packBgra4, src, unpackRgba4, rectpitch); + imageConvert(dst, 16, bx::packBgra4, src, bx::unpackRgba4, rectpitch); break; default: @@ -3154,6 +3154,7 @@ namespace bgfx { namespace d3d9 m_surface[ii] = NULL; } + m_denseIdx = UINT16_MAX; m_dsIdx = UINT8_MAX; m_num = 0; m_numTh = _num; @@ -3795,6 +3796,11 @@ namespace bgfx { namespace d3d9 { Rect scissorRect; scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); + if (scissorRect.isZeroArea() ) + { + continue; + } + DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, true) ); RECT rc; rc.left = scissorRect.m_x; @@ -4272,6 +4278,7 @@ namespace bgfx { namespace d3d9 { PIX_BEGINEVENT(D3DCOLOR_FRAME, L"debugstats"); + m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; static int64_t next = now; |
