1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 10:24:10 +01:00

[d3d9] Fix upload race with default image mapping

Fixes a Wine test
This commit is contained in:
Joshua Ashton 2021-08-11 10:39:19 +01:00 committed by Robin Kertels
parent 60a7047550
commit 679d703efc

View File

@ -4183,6 +4183,7 @@ namespace dxvk {
else {
physSlice = mappedBuffer->getSliceHandle();
if (!alloced) {
if (unlikely(wasWrittenByGPU)) {
Rc<DxvkImage> resourceImage = pResource->GetImage();
@ -4252,10 +4253,11 @@ namespace dxvk {
cPackedFormat);
}
});
}
if (!WaitForResource(mappedBuffer, Flags))
return D3DERR_WASSTILLDRAWING;
} else if (alloced) {
} else {
// If we are a new alloc, and we weren't written by the GPU
// that means that we are a newly initialized
// texture, and hence can just memset -> 0 and