From c497469cc0a8b31832ae75198810a14b5ffa1559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 29 Oct 2015 11:34:55 -0700 Subject: [PATCH] D3D9: Fixed texture update. --- src/renderer_d3d9.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index a2f2c5df..e3f9e17f 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -2585,10 +2585,12 @@ namespace bgfx { namespace d3d9 rect.right = rect.left + _rect->m_width; rect.bottom = rect.top + _rect->m_height; DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_staging2d->AddDirtyRect(&rect) ); } else { DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_staging2d->AddDirtyRect(NULL) ); } _pitch = lockedRect.Pitch; @@ -2600,6 +2602,7 @@ namespace bgfx { namespace d3d9 { D3DLOCKED_BOX box; DX_CHECK(m_staging3d->LockBox(_lod, &box, NULL, 0) ); + DX_CHECK(m_staging3d->AddDirtyBox(NULL) ); _pitch = box.RowPitch; _slicePitch = box.SlicePitch; return (uint8_t*)box.pBits; @@ -2617,10 +2620,12 @@ namespace bgfx { namespace d3d9 rect.right = rect.left + _rect->m_width; rect.bottom = rect.top + _rect->m_height; DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) ); } else { DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), NULL) ); } _pitch = lockedRect.Pitch;