Migrate ProfilerGPU to new lightweight queries API

This commit is contained in:
Wojtek Figat
2026-01-16 13:24:56 +01:00
parent 0d7c04682d
commit 847f6411e7
5 changed files with 44 additions and 55 deletions

View File

@@ -921,6 +921,7 @@ bool GPUDeviceDX11::GetQueryResult(uint64 queryID, uint64& result, bool wait)
result = query.Result;
return true;
}
ASSERT_LOW_LAYER(query.State == GPUQueryDataDX11::End);
auto context = GetIM();
RETRY:
@@ -935,7 +936,7 @@ RETRY:
context->GetData(query.TimerBeginQuery, &timeBegin, sizeof(timeBegin), 0);
context->GetData(query.Query, &timeEnd, sizeof(timeEnd), 0);
if (disjointData.Disjoint == FALSE)
if (disjointData.Disjoint == FALSE && disjointData.Frequency > 0)
{
result = timeEnd > timeBegin ? (timeEnd - timeBegin) * 1000000ull / disjointData.Frequency : 0;
}