diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-11-09 19:35:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-09 19:35:04 -0300 |
| commit | 934a78005e75653529c320cf90e78fe6536447c2 (patch) | |
| tree | a0601ef1abfbace3c35c10fb048d2e33447054c2 /Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs | |
| parent | eda6b78894eef3d9dc1e8ea6984e2f5bd319d68e (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.cs | 11 |
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) |
