1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 04:08:52 +01:00

[d3d9] Clear dirty range when discarding buffers

This commit is contained in:
Joshua Ashton 2020-06-11 05:58:17 +01:00
parent 7389da29be
commit 67f01631fa

View File

@ -4317,6 +4317,9 @@ namespace dxvk {
] (DxvkContext* ctx) {
ctx->invalidateBuffer(cBuffer, cBufferSlice);
});
pResource->SetReadLocked(false);
pResource->DirtyRange().Clear();
}
else {
// NOOVERWRITE promises that they will not write in a currently used area.
@ -4344,14 +4347,12 @@ namespace dxvk {
});
}
} else {
if (!(Flags & D3DLOCK_DONOTWAIT)) {
pResource->SetReadLocked(false);
pResource->DirtyRange().Clear();
}
if (!WaitForResource(mappingBuffer, Flags))
return D3DERR_WASSTILLDRAWING;
}
pResource->SetReadLocked(false);
pResource->DirtyRange().Clear();
}
// Use map pointer from previous map operation. This