Support bindless textures with separate constant buffers for texture and sampler (#2339)

This commit is contained in:
gdkchan 2021-06-08 19:42:25 -03:00 committed by GitHub
parent 8588586062
commit 02e2e561ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 22 deletions

View file

@ -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)
{