diff options
| author | hthh <hthh@hh.ht> | 2016-06-13 15:41:29 +1000 |
|---|---|---|
| committer | hthh <hthh@hh.ht> | 2016-07-04 18:54:49 +1000 |
| commit | 8be5717a60a4c4fbd29a0968a9f331152ff581e3 (patch) | |
| tree | 3cb3eb8fc7991eded6fdd5bf5ac35a633439d62e /Source/Core/VideoBackends/D3D12/PerfQuery.cpp | |
| parent | f8bf839e36ecd0addcc07b841a1dca66bf90dca9 (diff) | |
Improve PerfQuery accuracy
In TimeSplitters: Future Perfect, PerfQuery is used to detect
the visibility of lights and draw coronas. 25 points are drawn
for each light. However, the returned count was incorrectly
being divided by four leading to dim coronas.
Using 4x antialiasing was a workaround because of a bug where
antialiasing multiplied the PerfQuery results. This commit
fixes that bug too (but only for OpenGL).
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/PerfQuery.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/PerfQuery.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D12/PerfQuery.cpp b/Source/Core/VideoBackends/D3D12/PerfQuery.cpp index 4794b134c1..df5b5ce224 100644 --- a/Source/Core/VideoBackends/D3D12/PerfQuery.cpp +++ b/Source/Core/VideoBackends/D3D12/PerfQuery.cpp @@ -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()); |
