diff --git a/src/d3d9/d3d9_texture.cpp b/src/d3d9/d3d9_texture.cpp index 4b2371eaf..811a6cd3a 100644 --- a/src/d3d9/d3d9_texture.cpp +++ b/src/d3d9/d3d9_texture.cpp @@ -87,7 +87,9 @@ namespace dxvk { // Some games keep using the pointer returned in LockRect() after calling Unlock() // and purely rely on AddDirtyRect to notify D3D9 that contents have changed. // We have no way of knowing which mip levels were actually changed. - m_texture.SetAllNeedUpload(); + if (m_texture.IsManaged()) + m_texture.SetAllNeedUpload(); + return D3D_OK; } @@ -169,7 +171,9 @@ namespace dxvk { // Some games keep using the pointer returned in LockBox() after calling Unlock() // and purely rely on AddDirtyBox to notify D3D9 that contents have changed. // We have no way of knowing which mip levels were actually changed. - m_texture.SetAllNeedUpload(); + if (m_texture.IsManaged()) + m_texture.SetAllNeedUpload(); + return D3D_OK; } @@ -257,9 +261,12 @@ namespace dxvk { // Some games keep using the pointer returned in LockRect() after calling Unlock() // and purely rely on AddDirtyRect to notify D3D9 that contents have changed. // We have no way of knowing which mip levels were actually changed. - for (uint32_t m = 0; m < m_texture.Desc()->MipLevels; m++) { - m_texture.SetNeedsUpload(m_texture.CalcSubresource(Face, m), true); + if (m_texture.IsManaged()) { + for (uint32_t m = 0; m < m_texture.Desc()->MipLevels; m++) { + m_texture.SetNeedsUpload(m_texture.CalcSubresource(Face, m), true); + } } + return D3D_OK; }