mirror of
https://github.com/wolfpld/tracy
synced 2025-04-28 20:23:51 +00:00
quick-fix for TracyD3D11.hpp
Apparently, waiting for an enclosing query does not guarantee that the inner queries also become readily available... Need to wait for them too.
This commit is contained in:
parent
9b7d53a979
commit
5c069f9d8d
@ -95,6 +95,10 @@ public:
|
||||
|
||||
int64_t tcpu0 = Profiler::GetTime();
|
||||
WaitForQuery(m_disjointQuery);
|
||||
// NOTE: one would expect that by waiting for the enclosing disjoint query to finish,
|
||||
// all timestamp queries within would also be readily available, but that does not
|
||||
// seem to be the case here... See https://github.com/wolfpld/tracy/issues/947
|
||||
WaitForQuery(m_queries[0]);
|
||||
int64_t tcpu1 = Profiler::GetTime();
|
||||
|
||||
D3D11_QUERY_DATA_TIMESTAMP_DISJOINT disjoint = { };
|
||||
@ -109,7 +113,7 @@ public:
|
||||
|
||||
UINT64 timestamp = 0;
|
||||
if (m_immediateDevCtx->GetData(m_queries[0], ×tamp, sizeof(timestamp), 0) != S_OK)
|
||||
continue; // this should never happen, since the enclosing disjoint query succeeded
|
||||
continue; // this should never happen (we waited for the query to finish above)
|
||||
|
||||
tcpu = tcpu0 + (tcpu1 - tcpu0) * 1 / 2;
|
||||
tgpu = timestamp * (1000000000 / disjoint.Frequency);
|
||||
|
Loading…
x
Reference in New Issue
Block a user