mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[d3d9] Fix upload race with default image mapping
Fixes a Wine test
This commit is contained in:
parent
60a7047550
commit
679d703efc
@ -4183,6 +4183,7 @@ namespace dxvk {
|
|||||||
else {
|
else {
|
||||||
physSlice = mappedBuffer->getSliceHandle();
|
physSlice = mappedBuffer->getSliceHandle();
|
||||||
|
|
||||||
|
if (!alloced) {
|
||||||
if (unlikely(wasWrittenByGPU)) {
|
if (unlikely(wasWrittenByGPU)) {
|
||||||
Rc<DxvkImage> resourceImage = pResource->GetImage();
|
Rc<DxvkImage> resourceImage = pResource->GetImage();
|
||||||
|
|
||||||
@ -4252,10 +4253,11 @@ namespace dxvk {
|
|||||||
cPackedFormat);
|
cPackedFormat);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!WaitForResource(mappedBuffer, Flags))
|
if (!WaitForResource(mappedBuffer, Flags))
|
||||||
return D3DERR_WASSTILLDRAWING;
|
return D3DERR_WASSTILLDRAWING;
|
||||||
} else if (alloced) {
|
} else {
|
||||||
// If we are a new alloc, and we weren't written by the GPU
|
// If we are a new alloc, and we weren't written by the GPU
|
||||||
// that means that we are a newly initialized
|
// that means that we are a newly initialized
|
||||||
// texture, and hence can just memset -> 0 and
|
// texture, and hence can just memset -> 0 and
|
||||||
|
Loading…
Reference in New Issue
Block a user