diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-09-07 20:25:22 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 20:25:22 -0300 |
commit | 408bd63b08cbde8ba55bb05a39868271a9e40ba4 (patch) | |
tree | e4f87dce8d882a5e2ec19808c2ad0809d12f9656 /Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs | |
parent | df99257d7f30f3952ca9e2a1386339777eec3327 (diff) |
Transform shader LDC into constant buffer access if offset is constant (#3672)1.1.251
* Transform shader LDC into constant buffer access if offset is constant
* Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs b/Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs index 856a5598..092e52a9 100644 --- a/Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs +++ b/Ryujinx.Graphics.Shader/Translation/Optimizations/ConstantFolding.cs @@ -153,6 +153,10 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations EvaluateFPUnary(operation, (x) => float.IsNaN(x)); break; + case Instruction.LoadConstant: + operation.TurnIntoCopy(Cbuf(operation.GetSource(0).Value, operation.GetSource(1).Value)); + break; + case Instruction.Maximum: EvaluateBinary(operation, (x, y) => Math.Max(x, y)); break; |