1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-19 09:12:01 +00:00
Ryujinx/Ryujinx.Graphics.Gpu/Engine
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
..
Compute GPU: Swap bindings array instead of copying (#4003) 2022-12-04 18:18:40 +01:00
Dma GPU: Pass SpanOrArray for Texture SetData to avoid copy (#3745) 2022-10-08 12:04:47 -03:00
GPFifo GPU: Access non-prefetch command buffers directly (#3882) 2022-11-24 01:56:55 +00:00
InlineToMemory Fast path for Inline-to-Memory texture data transfers (#3610) 2022-08-26 02:16:41 +00:00
MME Implement HLE macro for DrawElementsIndirect (#3748) 2022-11-16 14:53:04 -03:00
Threed GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
Twod Perform unscaled 2d engine copy on CPU if source texture isn't in cache. (#3112) 2022-02-22 11:21:29 -03:00
Types Fix blend with RGBX color formats (#3553) 2022-08-11 18:23:25 -03:00
ConditionalRenderEnabled.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
DeviceStateWithShadow.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
MmeShadowScratch.cs Rename ToSpan to AsSpan (#3556) 2022-08-11 18:07:37 -03:00
SetMmeShadowRamControlMode.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ShaderTexture.cs Fix image binding format (#1625) 2020-10-20 19:03:20 -03:00