diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-11 03:54:18 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | f2c85c5d58a0aeda5d5fe2d7a980cc7284330288 (patch) | |
| tree | e9a3b2100de28120cd52239b5af9615b750ec352 /Ryujinx.Graphics.Shader/StructuredIr | |
| parent | 3323a3a042c85ce88926771159fc041b5576de60 (diff) | |
Support non-constant texture offsets on non-NVIDIA gpus
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr')
| -rw-r--r-- | Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs b/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs index 9614b659..c276959a 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs @@ -85,6 +85,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr Add(Instruction.LoadLocal, VariableType.U32, VariableType.S32); Add(Instruction.LoadShared, VariableType.U32, VariableType.S32); Add(Instruction.LoadStorage, VariableType.U32, VariableType.S32, VariableType.S32); + Add(Instruction.Lod, VariableType.F32); Add(Instruction.LogarithmB2, VariableType.Scalar, VariableType.Scalar); Add(Instruction.LogicalAnd, VariableType.Bool, VariableType.Bool, VariableType.Bool); Add(Instruction.LogicalExclusiveOr, VariableType.Bool, VariableType.Bool, VariableType.Bool); @@ -139,9 +140,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr { // TODO: Return correct type depending on source index, // that can improve the decompiler output. - if (inst == Instruction.TextureSample || - inst == Instruction.ImageLoad || - inst == Instruction.ImageStore) + if ( + inst == Instruction.ImageLoad || + inst == Instruction.ImageStore || + inst == Instruction.Lod || + inst == Instruction.TextureSample) { return VariableType.F32; } |
