From 934a78005e75653529c320cf90e78fe6536447c2 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 9 Nov 2020 19:35:04 -0300 Subject: Simplify logic for bindless texture handling (#1667) * Simplify logic for bindless texture handling * Nits --- Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs index f86e82da..e20df384 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs @@ -86,18 +86,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl private int FindDescriptorIndex(List list, AstTextureOperation texOp) { - AstOperand operand = texOp.GetSource(0) as AstOperand; - bool bindless = (texOp.Flags & TextureFlags.Bindless) > 0; - - int cBufSlot = bindless ? operand.CbufSlot : 0; - int cBufOffset = bindless ? operand.CbufOffset : 0; - return list.FindIndex(descriptor => descriptor.Type == texOp.Type && + descriptor.CbufSlot == texOp.CbufSlot && descriptor.HandleIndex == texOp.Handle && - descriptor.Format == texOp.Format && - descriptor.CbufSlot == cBufSlot && - descriptor.CbufOffset == cBufOffset); + descriptor.Format == texOp.Format); } public int FindTextureDescriptorIndex(AstTextureOperation texOp) -- cgit v1.2.3