mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d9] Only set upload bit for managed textures
Otherwise D3DPOOL_DEFAULT can hit the draw time late upload path.
This commit is contained in:
parent
ba4d95c5fc
commit
08ad6583ea
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user