Ryujinx-uplift/Ryujinx.Graphics.Gpu/Engine/Threed
riperiperi 6e9bd4de13
GPU: Scale counter results before addition (#4471)
* 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.
2023-03-12 18:01:15 +01:00
..
Blender Add support for advanced blend (part 1/2) (#2801) 2023-02-19 22:37:37 -03:00
ConditionalRendering.cs Implement HLE macro for DrawElementsIndirect (#3748) 2022-11-16 14:53:04 -03:00
ConstantBufferUpdater.cs GPU: Don't trigger uploads for redundant buffer updates (#3828) 2022-11-24 15:50:15 +01:00
DrawManager.cs Handle mismatching texture size with copy dependencies (#4364) 2023-02-08 08:48:09 +01:00
DrawState.cs Fix DrawArrays vertex buffer size (#4141) 2022-12-21 19:08:12 +01:00
IbStreamer.cs Fix instanced indexed inline draw index count (#3389) 2022-06-10 23:44:49 -03:00
IndirectDrawType.cs Implement HLE macro for DrawElementsIndirect (#3748) 2022-11-16 14:53:04 -03:00
RenderTargetUpdateFlags.cs Handle mismatching texture size with copy dependencies (#4364) 2023-02-08 08:48:09 +01:00
SemaphoreUpdater.cs GPU: Scale counter results before addition (#4471) 2023-03-12 18:01:15 +01:00
SpecializationStateUpdater.cs Vulkan: Add workarounds for MoltenVK (#4202) 2023-01-13 01:31:21 +01:00
StateUpdater.cs Account for multisample when calculating render target size hint (#4467) 2023-02-23 10:08:54 +01:00
StateUpdateTracker.cs Vulkan: Add workarounds for MoltenVK (#4202) 2023-01-13 01:31:21 +01:00
ThreedClass.cs Add support for advanced blend (part 1/2) (#2801) 2023-02-19 22:37:37 -03:00
ThreedClassState.cs Add support for advanced blend (part 1/2) (#2801) 2023-02-19 22:37:37 -03:00