Commit aa26dd28 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Mark MANAGED as needing upload in Lock rather than Unlock

Closes #426
parent 0c84d729
Pipeline #924 passed with stage
in 10 minutes and 8 seconds
......@@ -4162,9 +4162,13 @@ namespace dxvk {
// We need to remove the READONLY flags from the map flags
// if there was ever a non-readonly upload.
if (!(Flags & D3DLOCK_READONLY))
if (!(Flags & D3DLOCK_READONLY)) {
oldFlags &= ~D3DLOCK_READONLY;
if (pResource->Desc()->Pool != D3DPOOL_DEFAULT)
pResource->MarkNeedsUpload();
}
pResource->SetMapFlags(Flags | oldFlags);
pResource->IncrementLockCount();
......@@ -4212,10 +4216,8 @@ namespace dxvk {
pResource->SetMapFlags(0);
if (pResource->Desc()->Pool != D3DPOOL_DEFAULT) {
pResource->MarkNeedsUpload();
if (pResource->Desc()->Pool != D3DPOOL_DEFAULT)
return D3D_OK;
}
FlushImplicit(FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment