1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00
Ryujinx/Ryujinx.Graphics.Gpu/Engine/Threed
riperiperi 9ac66336a2
GPU: Use lazy checks for specialization state (#4004)
* GPU: Use lazy checks for specialization state

This PR adds a new class, the SpecializationStateUpdater, that allows elements of specialization state to be updated individually, and signal the state is checked when it changes between draws, instead of building and checking it on every draw. This also avoids building spec state when

Most state updates have been moved behind the shader state update, so that their specialization state updates make it in before shaders are fetched.

Downside: Fields in GpuChannelGraphicsState are no longer readonly. To counteract copies that might be caused this I pass it as `ref` when possible, though maybe `in` would be better? Not really sure about the quirks of `in` and the difference probably won't show on a benchmark.

The result is around 2 extra FPS on SMO in the usual spot. Not much right now, but it will remove costs when we're doing more expensive specialization checks, such as fragment output type specialization for macos. It may also help more on other games with more draws.

* Address Feedback

* Oops
2022-12-04 18:41:17 +01: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 GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
DrawState.cs Implement HLE macro for DrawElementsIndirect (#3748) 2022-11-16 14:53:04 -03: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
SemaphoreUpdater.cs Scale SamplesPassed counter by RT scale on report (#3680) 2022-09-11 15:58:15 +00:00
SpecializationStateUpdater.cs GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
StateUpdater.cs GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
StateUpdateTracker.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ThreedClass.cs GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
ThreedClassState.cs Use RGBA16 vertex format if RGB16 is not supported on Vulkan (#3552) 2022-08-20 16:20:27 -03:00