GPU: Swap bindings array instead of copying
Reduces work on UpdateShaderState. Now the cost is a few reference moves for arrays (for stages with bindings), rather than copying data. Cached bindings arrays are created when shaders are loaded.
1-2 fps here on the usual spot in SMO.
Upside: Removes a bunch of redundant code from ComputeClass, cheaper UpdateShaderState. Downside: bindings arrays are no longer readonly (though it was only the top level array that was readonly, not the contained ones).
I'm not sure what to do about the default arrays for textureBindings etc that are created. It could still be possible for these arrays to be used without a shader being set, I guess? Right now they are left in.
Download the artifacts for this pull request:
- ryujinx-Release-1.1.0+d8a6e87-linux_x64
- ryujinx-Release-1.1.0+d8a6e87-osx_x64
- ryujinx-Release-1.1.0+d8a6e87-win_x64
Experimental GUI (Avalonia)
GUI-less (SDL2)
Only for Developers
- ava-ryujinx-Debug-1.1.0+d8a6e87-linux_x64
- ava-ryujinx-Debug-1.1.0+d8a6e87-osx_x64
- ava-ryujinx-Debug-1.1.0+d8a6e87-win_x64
- ryujinx-Debug-1.1.0+d8a6e87-linux_x64
- ryujinx-Debug-1.1.0+d8a6e87-osx_x64
- ryujinx-Debug-1.1.0+d8a6e87-win_x64
- sdl2-ryujinx-headless-Debug-1.1.0+d8a6e87-linux_x64
- sdl2-ryujinx-headless-Debug-1.1.0+d8a6e87-osx_x64
- sdl2-ryujinx-headless-Debug-1.1.0+d8a6e87-win_x64