1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-27 13:54:16 +01:00

[d3d11] Synchronize CS thread after flush when waiting for resource

In some rare cases, the flush operation itself may add new references
which we need to see while spinning on the resource's usage counter.
This commit is contained in:
Philip Rebohle 2018-09-01 21:25:39 +02:00
parent 2b3d9aaf5c
commit 09948a3495
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -520,7 +520,6 @@ namespace dxvk {
// Wait for the any pending D3D11 command to be executed
// on the CS thread so that we can determine whether the
// resource is currently in use or not.
FlushCsChunk();
SynchronizeCsThread();
if (Resource->isInUse()) {
@ -534,6 +533,7 @@ namespace dxvk {
// Make sure pending commands using the resource get
// executed on the the GPU if we have to wait for it
Flush();
SynchronizeCsThread();
while (Resource->isInUse())
dxvk::this_thread::yield();