1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-18 04:54:15 +01:00

[d3d9] Don't block on GetRenderTargetData

Fixes perf in #1363
This commit is contained in:
Joshua Ashton 2020-01-24 05:32:01 +00:00
parent 7469f5d4a0
commit 6fa28bf937
2 changed files with 5 additions and 14 deletions

View File

@ -812,13 +812,8 @@ namespace dxvk {
cImage, cSubresources, VkOffset3D { 0, 0, 0 },
cLevelExtent);
});
// We need to force a wait here
// as some applications depend on
// DO_NOT_WAIT not applying after
// this has happened.
// (this is a blocking call)
WaitForResource(dstBuffer, 0);
dstTexInfo->SetDirty(dst->GetSubresource(), true);
return D3D_OK;
}
@ -3861,7 +3856,8 @@ namespace dxvk {
// or is reading. Remember! This will only trigger for MANAGED resources
// that cannot get affected by GPU, therefore readonly is A-OK for NOT waiting.
const bool readOnly = Flags & D3DLOCK_READONLY;
const bool skipWait = (readOnly && managed) || scratch || (readOnly && systemmem);
const bool dirty = pResource->SetDirty(Subresource, false);
const bool skipWait = (readOnly && managed) || scratch || (readOnly && systemmem && !dirty);
if (alloced)
std::memset(physSlice.mapPtr, 0, physSlice.length);

View File

@ -318,12 +318,7 @@ namespace dxvk {
cLevelExtent);
});
// We need to force a wait here
// as some applications depend on
// DO_NOT_WAIT not applying after
// this has happened.
// (this is a blocking call)
m_parent->WaitForResource(dstBuffer, 0);
dstTexInfo->SetDirty(dst->GetSubresource(), true);
return D3D_OK;
}