Merge pull request #3893 from hthh/perf-query-bug

Improve PerfQuery accuracy
This commit is contained in:
Markus Wick
2016-09-27 13:07:35 +02:00
committed by GitHub
3 changed files with 24 additions and 7 deletions

View File

@ -86,7 +86,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()
@ -102,6 +102,8 @@ void PerfQuery::FlushOne()
}
// 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());