mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[d3d11] Fixed potential sync issue in Map()
This commit is contained in:
parent
7ac0d413ad
commit
b494bb2ac1
@ -122,14 +122,13 @@ namespace dxvk {
|
|||||||
} else if (MapType != D3D11_MAP_WRITE_NO_OVERWRITE) {
|
} else if (MapType != D3D11_MAP_WRITE_NO_OVERWRITE) {
|
||||||
// Synchronize with CS thread so that we know whether
|
// Synchronize with CS thread so that we know whether
|
||||||
// the buffer is currently in use by the GPU or not
|
// the buffer is currently in use by the GPU or not
|
||||||
|
Flush();
|
||||||
SynchronizeCsThread();
|
SynchronizeCsThread();
|
||||||
|
|
||||||
if (buffer->isInUse()) {
|
while (buffer->isInUse()) {
|
||||||
if (MapFlags & D3D11_MAP_FLAG_DO_NOT_WAIT)
|
if (MapFlags & D3D11_MAP_FLAG_DO_NOT_WAIT)
|
||||||
return DXGI_ERROR_WAS_STILL_DRAWING;
|
return DXGI_ERROR_WAS_STILL_DRAWING;
|
||||||
|
|
||||||
Flush();
|
|
||||||
SynchronizeCsThread();
|
|
||||||
SynchronizeDevice();
|
SynchronizeDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -744,6 +744,8 @@ namespace dxvk {
|
|||||||
image->info().stages,
|
image->info().stages,
|
||||||
image->info().access);
|
image->info().access);
|
||||||
m_barriers.recordCommands(m_cmd);
|
m_barriers.recordCommands(m_cmd);
|
||||||
|
|
||||||
|
m_cmd->trackResource(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -995,6 +997,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_cmd->trackResource(fb);
|
m_cmd->trackResource(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_cmd->trackResource(srcImage);
|
||||||
|
m_cmd->trackResource(dstImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user