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

[d3d11] Enable stall tracking for timestamp queries

Because games are dumb and don't understand that the GPU doesn't
work synchronously with the render thread.
This commit is contained in:
Philip Rebohle 2022-02-16 19:44:40 +01:00
parent d45f5a8d79
commit 2dfdc5ac3b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 12 additions and 4 deletions

View File

@ -140,11 +140,13 @@ namespace dxvk {
cQuery->End(ctx);
});
if (unlikely(query->IsEvent())) {
if (unlikely(query->TrackStalls())) {
query->NotifyEnd();
query->IsStalling()
? Flush()
: FlushImplicit(TRUE);
if (query->IsStalling())
Flush();
else if (query->IsEvent())
FlushImplicit(TRUE);
}
}

View File

@ -62,6 +62,12 @@ namespace dxvk {
return m_desc.Query == D3D11_QUERY_EVENT;
}
bool TrackStalls() const {
return m_desc.Query == D3D11_QUERY_EVENT
|| m_desc.Query == D3D11_QUERY_TIMESTAMP
|| m_desc.Query == D3D11_QUERY_TIMESTAMP_DISJOINT;
}
bool IsStalling() const {
return m_stallFlag;
}