aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Queries/Counters.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2023-03-12 17:01:15 +0000
committerGitHub <noreply@github.com>2023-03-12 18:01:15 +0100
commit6e9bd4de138e6ddedef3d38d711d161a0e400d5c (patch)
treed8df41e79eae9ae9fe333f95fc15c2f43e4e0584 /Ryujinx.Graphics.OpenGL/Queries/Counters.cs
parent05a41b31bc4d2b973662ac370458697c0bf712a9 (diff)
GPU: Scale counter results before addition (#4471)1.1.662
* GPU: Scale counter results before addition Counter results were being scaled on ReportCounter, which meant that the _total_ value of the counter was being scaled. Not only could this result in very large numbers and weird overflows if the game doesn't clear the counter, but it also caused the result to change drastically. This PR changes scaling to be done when the value is added to the counter on the backend. This should evaluate the scale at the same time as before, on report counter, but avoiding the issue with scaling the total. Fixes scaling in Warioware, at least in the demo, where it seems to compare old/new counters and broke down when scaling was enabled. * Fix issues when result is partially uploaded. Drivers tend to write the low half first, then the high half. Retry if the high half is FFFFFFFF.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Queries/Counters.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Queries/Counters.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Queries/Counters.cs b/Ryujinx.Graphics.OpenGL/Queries/Counters.cs
index ebfd899c..e6c7ab2b 100644
--- a/Ryujinx.Graphics.OpenGL/Queries/Counters.cs
+++ b/Ryujinx.Graphics.OpenGL/Queries/Counters.cs
@@ -14,12 +14,12 @@ namespace Ryujinx.Graphics.OpenGL.Queries
_counterQueues = new CounterQueue[count];
}
- public void Initialize()
+ public void Initialize(Pipeline pipeline)
{
for (int index = 0; index < _counterQueues.Length; index++)
{
CounterType type = (CounterType)index;
- _counterQueues[index] = new CounterQueue(type);
+ _counterQueues[index] = new CounterQueue(pipeline, type);
}
}