1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d11] Don't sync CS thread if resource to map is already in use

SynchronizeCsThread can only update the in-use state from available
to in-use, so doing this on a resource that is already in-use is not
necessary. May improve performance in combination with DO_NOT_WAIT.
This commit is contained in:
Philip Rebohle 2019-10-14 00:14:00 +02:00
parent 12f0f8b13f
commit bd58f1a913
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -569,7 +569,8 @@ namespace dxvk {
// Wait for the any pending D3D11 command to be executed // Wait for the any pending D3D11 command to be executed
// on the CS thread so that we can determine whether the // on the CS thread so that we can determine whether the
// resource is currently in use or not. // resource is currently in use or not.
SynchronizeCsThread(); if (!Resource->isInUse(access))
SynchronizeCsThread();
if (Resource->isInUse(access)) { if (Resource->isInUse(access)) {
if (MapFlags & D3D11_MAP_FLAG_DO_NOT_WAIT) { if (MapFlags & D3D11_MAP_FLAG_DO_NOT_WAIT) {