diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-06-08 19:42:25 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-09 00:42:25 +0200 |
| commit | 02e2e561ac136473d4d259d872dc5e211c6a3e67 (patch) | |
| tree | 163d40e3be37a5f77853228c64e55412d1108fc3 /Ryujinx.Graphics.Shader/Translation/Optimizations | |
| parent | 8588586062b4e121cb3265b64501fe935f066e95 (diff) | |
Support bindless textures with separate constant buffers for texture and sampler (#2339)
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/Optimizations')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs b/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs index 3a523adc..6156a6f4 100644 --- a/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs +++ b/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs @@ -50,13 +50,16 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations Operand src0 = Utils.FindLastOperation(handleCombineOp.GetSource(0), block); Operand src1 = Utils.FindLastOperation(handleCombineOp.GetSource(1), block); - if (src0.Type != OperandType.ConstantBuffer || - src1.Type != OperandType.ConstantBuffer || src0.GetCbufSlot() != src1.GetCbufSlot()) + if (src0.Type != OperandType.ConstantBuffer || src1.Type != OperandType.ConstantBuffer) { continue; } - SetHandle(config, texOp, src0.GetCbufOffset() | (src1.GetCbufOffset() << 16), src0.GetCbufSlot()); + SetHandle( + config, + texOp, + src0.GetCbufOffset() | (src1.GetCbufOffset() << 16), + src0.GetCbufSlot() | ((src1.GetCbufSlot() + 1) << 16)); } else if (texOp.Inst == Instruction.ImageLoad || texOp.Inst == Instruction.ImageStore) { |
