diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2023-09-05 15:34:43 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2024-04-18 14:45:28 -0500 |
| commit | 1e27183dff95ece6301b7171d2cd573a36a2dd65 (patch) | |
| tree | 311498ce1ec411d7c9b6dd04335dbf2a65e9a7f7 /Source/Core/VideoCommon/VertexManagerBase.cpp | |
| parent | 1805f6e38158c90b9108895d42ca6cc37d0aeff7 (diff) | |
VideoCommon: Show the average projection to viewport ratio in statistics
window.
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexManagerBase.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index 94d609c23f..b51cfa19e0 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -520,15 +520,21 @@ void VertexManagerBase::Flush() auto& counts = is_perspective ? m_flush_statistics.perspective : m_flush_statistics.orthographic; + const auto& projection = xfmem.projection.rawProjection; // TODO: Potentially the viewport size could be used as weight for the flush count average. // This way a small minimap would have less effect than a fullscreen projection. + const auto& viewport = xfmem.viewport; - if (IsAnamorphicProjection(xfmem.projection.rawProjection, xfmem.viewport, g_ActiveConfig)) + // FYI: This average is based on flushes. + // It doesn't look at vertex counts like the heuristic does. + counts.average_ratio.Push(CalculateProjectionViewportRatio(projection, viewport)); + + if (IsAnamorphicProjection(projection, viewport, g_ActiveConfig)) { ++counts.anamorphic_flush_count; counts.anamorphic_vertex_count += m_index_generator.GetIndexLen(); } - else if (IsNormalProjection(xfmem.projection.rawProjection, xfmem.viewport, g_ActiveConfig)) + else if (IsNormalProjection(projection, viewport, g_ActiveConfig)) { ++counts.normal_flush_count; counts.normal_vertex_count += m_index_generator.GetIndexLen(); |
