From 53d096e392d85106a41d8edad1dcda5cce7446a2 Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Sun, 26 May 2024 13:30:19 -0300
Subject: Allow texture arrays to use separate descriptor sets on Vulkan
 (#6870)

* Report base and extra sets from the backend

* Pass texture set index everywhere

* Key textures using set and binding (rather than just binding)

* Start using extra sets for array textures

* Shader cache version bump

* Separate new commands, some PR feedback

* Introduce new manual descriptor set reservation method that prevents it from being used by something else while owned by an array

* Move bind extra sets logic to new method

* Should only use separate array is MaximumExtraSets is not zero

* Format whitespace
---
 .../StructuredIr/StructuredProgram.cs                        | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs')

diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
index c4ebaee7..88053658 100644
--- a/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
+++ b/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
@@ -169,7 +169,17 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
 
             AstTextureOperation GetAstTextureOperation(TextureOperation texOp)
             {
-                return new AstTextureOperation(inst, texOp.Type, texOp.Format, texOp.Flags, texOp.Binding, texOp.SamplerBinding, texOp.Index, sources);
+                return new AstTextureOperation(
+                    inst,
+                    texOp.Type,
+                    texOp.Format,
+                    texOp.Flags,
+                    texOp.Set,
+                    texOp.Binding,
+                    texOp.SamplerSet,
+                    texOp.SamplerBinding,
+                    texOp.Index,
+                    sources);
             }
 
             int componentsCount = BitOperations.PopCount((uint)operation.Index);
-- 
cgit v1.2.3-70-g09d2