mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Merge pull request #3893 from hthh/perf-query-bug
Improve PerfQuery accuracy
This commit is contained in:
@ -98,7 +98,7 @@ u32 PerfQuery::GetQueryResult(PerfQueryType type)
|
||||
else if (type == PQ_EFB_COPY_CLOCKS)
|
||||
result = m_results[PQG_EFB_COPY_CLOCKS];
|
||||
|
||||
return result / 4;
|
||||
return result;
|
||||
}
|
||||
|
||||
void PerfQuery::FlushOne()
|
||||
@ -126,6 +126,8 @@ void PerfQuery::FlushOne()
|
||||
m_query_readback_buffer->Unmap(0, &write_range);
|
||||
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
// TODO: Dropping the lower 2 bits from this count should be closer to actual
|
||||
// hardware behavior when drawing triangles.
|
||||
m_results[entry.query_type] += (u32)(result * EFB_WIDTH / g_renderer->GetTargetWidth() *
|
||||
EFB_HEIGHT / g_renderer->GetTargetHeight());
|
||||
|
||||
@ -179,6 +181,8 @@ void PerfQuery::FlushResults()
|
||||
sizeof(UINT64));
|
||||
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
// TODO: Dropping the lower 2 bits from this count should be closer to actual
|
||||
// hardware behavior when drawing triangles.
|
||||
m_results[entry.query_type] += (u32)(result * EFB_WIDTH / g_renderer->GetTargetWidth() *
|
||||
EFB_HEIGHT / g_renderer->GetTargetHeight());
|
||||
|
||||
|
Reference in New Issue
Block a user