diff options
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 |