aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-05-05 11:20:20 -0300
committerGitHub <noreply@github.com>2023-05-05 14:20:20 +0000
commitaa021085cfab10ab63a7e6c2f9c9e29b4111525c (patch)
treebbf192b3c321110fa6abd6f8bcd7c429119daa93 /src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
parent1f5d8818609a82df893167a8ec5bd6ccda406c61 (diff)
Allow any shader SSBO constant buffer slot and offset (#2237)1.1.755
* Allow any shader SSBO constant buffer slot and offset * Fix slot value passed to SetUsedStorageBuffer on fallback case * Shader cache version * Ensure that the storage buffer source constant buffer offset is word aligned * Fix FirstBinding on GetUniformBufferDescriptors
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/BufferDescriptor.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/BufferDescriptor.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs b/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
index 4ce8a896..410c1991 100644
--- a/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
+++ b/src/Ryujinx.Graphics.Shader/BufferDescriptor.cs
@@ -5,13 +5,27 @@ namespace Ryujinx.Graphics.Shader
// New fields should be added to the end of the struct to keep disk shader cache compatibility.
public readonly int Binding;
- public readonly int Slot;
+ public readonly byte Slot;
+ public readonly byte SbCbSlot;
+ public readonly ushort SbCbOffset;
public BufferUsageFlags Flags;
public BufferDescriptor(int binding, int slot)
{
Binding = binding;
- Slot = slot;
+ Slot = (byte)slot;
+ SbCbSlot = 0;
+ SbCbOffset = 0;
+
+ Flags = BufferUsageFlags.None;
+ }
+
+ public BufferDescriptor(int binding, int slot, int sbCbSlot, int sbCbOffset)
+ {
+ Binding = binding;
+ Slot = (byte)slot;
+ SbCbSlot = (byte)sbCbSlot;
+ SbCbOffset = (ushort)sbCbOffset;
Flags = BufferUsageFlags.None;
}