diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-05-21 14:04:21 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-21 14:04:21 -0300 |
| commit | 5626f2ca1c49342b20772224f956147df6957b5a (patch) | |
| tree | 9e60d080754e3686d75cc8606db5967126d2c1b9 /src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs | |
| parent | 402f05b8ef013807997589ecc0a8ff50267dcd23 (diff) | |
Replace ShaderBindings with new ResourceLayout structure for Vulkan (#5025)
* Introduce ResourceLayout
* Part 1: Use new ResourceSegments array on UpdateAndBind
* Part 2: Use ResourceLayout to build PipelineLayout
* Delete old code
* XML docs
* Fix shader cache load NRE
* Fix typo
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs b/src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs index 7db627ba..e4e1e0d6 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/GpuAccessorBase.cs @@ -110,16 +110,16 @@ namespace Ryujinx.Graphics.Gpu.Shader Logger.Error?.Print(LogClass.Gpu, $"{resourceName} index {index} exceeds per stage limit of {maxPerStage}."); } - return GetStageIndex() * (int)maxPerStage + index; + return GetStageIndex(_stageIndex) * (int)maxPerStage + index; } - private int GetStageIndex() + public static int GetStageIndex(int stageIndex) { // This is just a simple remapping to ensure that most frequently used shader stages // have the lowest binding numbers. // This is useful because if we need to run on a system with a low limit on the bindings, // then we can still get most games working as the most common shaders will have low binding numbers. - return _stageIndex switch + return stageIndex switch { 4 => 1, // Fragment 3 => 2, // Geometry |
