From f2c85c5d58a0aeda5d5fe2d7a980cc7284330288 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 11 Dec 2019 03:54:18 -0300 Subject: Support non-constant texture offsets on non-NVIDIA gpus --- Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Shader/StructuredIr') 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; } -- cgit v1.2.3