1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[d3d11] Fixed potential sync issue in Map()

This commit is contained in:
Philip Rebohle 2018-03-07 10:37:27 +01:00
parent 7ac0d413ad
commit b494bb2ac1
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 7 additions and 3 deletions

View File

@ -122,14 +122,13 @@ namespace dxvk {
} else if (MapType != D3D11_MAP_WRITE_NO_OVERWRITE) {
// Synchronize with CS thread so that we know whether
// the buffer is currently in use by the GPU or not
Flush();
SynchronizeCsThread();
if (buffer->isInUse()) {
while (buffer->isInUse()) {
if (MapFlags & D3D11_MAP_FLAG_DO_NOT_WAIT)
return DXGI_ERROR_WAS_STILL_DRAWING;
Flush();
SynchronizeCsThread();
SynchronizeDevice();
}
}

View File

@ -744,6 +744,8 @@ namespace dxvk {
image->info().stages,
image->info().access);
m_barriers.recordCommands(m_cmd);
m_cmd->trackResource(image);
}
@ -995,6 +997,9 @@ namespace dxvk {
m_cmd->trackResource(fb);
}
m_cmd->trackResource(srcImage);
m_cmd->trackResource(dstImage);
}