aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-11-09 19:35:04 -0300
committerGitHub <noreply@github.com>2020-11-09 19:35:04 -0300
commit934a78005e75653529c320cf90e78fe6536447c2 (patch)
treea0601ef1abfbace3c35c10fb048d2e33447054c2 /Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
parenteda6b78894eef3d9dc1e8ea6984e2f5bd319d68e (diff)
Simplify logic for bindless texture handling (#1667)
* Simplify logic for bindless texture handling * Nits
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs11
1 files changed, 2 insertions, 9 deletions
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<TextureDescriptor> 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)