From a2a97e1b11d38b51231e05a1da5202481cdf4df8 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 3 Oct 2023 19:43:11 -0300 Subject: Implement textureSamples texture query shader instruction (#5750) * Implement textureSamples texture query shader instruction * Shader cache version bump --- .../Translation/Optimizations/BindlessElimination.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Ryujinx.Graphics.Shader/Translation/Optimizations') diff --git a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs index 43d98d3c..19b7999a 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs @@ -27,9 +27,7 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations continue; } - if (texOp.Inst == Instruction.Lod || - texOp.Inst == Instruction.TextureSample || - texOp.Inst == Instruction.TextureSize) + if (texOp.Inst == Instruction.TextureSample || texOp.Inst.IsTextureQuery()) { Operand bindlessHandle = Utils.FindLastOperation(texOp.GetSource(0), block); @@ -40,7 +38,8 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations // as long bindless elimination is successful and we know where the texture descriptor is located. bool rewriteSamplerType = texOp.Type == SamplerType.TextureBuffer || - texOp.Inst == Instruction.TextureSize; + texOp.Inst == Instruction.TextureQuerySamples || + texOp.Inst == Instruction.TextureQuerySize; if (bindlessHandle.Type == OperandType.ConstantBuffer) { -- cgit v1.2.3