Ryujinx/Ryujinx.Graphics.Gpu
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
..
Engine GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
Image GPU: Swap bindings array instead of copying (#4003) 2022-12-04 18:18:40 +01:00
Memory GPU: Swap bindings array instead of copying (#4003) 2022-12-04 18:18:40 +01:00
Shader GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
Synchronization When waiting on CPU, do not return a time out error from EventWait (#2780) 2021-11-01 19:10:02 -03:00
ClassId.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
Constants.cs GPU: Eliminate CB0 accesses when storage buffer accesses are resolved (#3847) 2022-11-17 18:47:41 +01:00
GpuChannel.cs Unsubscribe MemoryUnmappedHandler even when GPU channel is destroyed (#3872) 2022-11-19 23:54:33 -03:00
GpuContext.cs GPU: Track buffer migrations and flush source on incomplete copy (#3952) 2022-12-01 16:30:13 +01:00
GraphicsConfig.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
Ryujinx.Graphics.Gpu.csproj infra: Migrate to .NET 7 (#3795) 2022-11-09 20:22:43 +01:00
Window.cs Allow Surface Flinger frame enqueue after process has exited (#3733) 2022-10-02 21:50:03 +00:00