aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs b/src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs
index d559f669..c89c4d0b 100644
--- a/src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs
+++ b/src/Ryujinx.Graphics.Shader/Translation/ResourceReservations.cs
@@ -11,6 +11,8 @@ namespace Ryujinx.Graphics.Shader.Translation
public const int MaxVertexBufferTextures = 32;
+ private const int TextureSetIndex = 2; // TODO: Get from GPU accessor.
+
public int VertexInfoConstantBufferBinding { get; }
public int VertexOutputStorageBufferBinding { get; }
public int GeometryVertexOutputStorageBufferBinding { get; }
@@ -163,6 +165,21 @@ namespace Ryujinx.Graphics.Shader.Translation
return _vertexBufferTextureBaseBinding + vaLocation;
}
+ public SetBindingPair GetVertexBufferTextureSetAndBinding(int vaLocation)
+ {
+ return new SetBindingPair(TextureSetIndex, GetVertexBufferTextureBinding(vaLocation));
+ }
+
+ public SetBindingPair GetIndexBufferTextureSetAndBinding()
+ {
+ return new SetBindingPair(TextureSetIndex, IndexBufferTextureBinding);
+ }
+
+ public SetBindingPair GetTopologyRemapBufferTextureSetAndBinding()
+ {
+ return new SetBindingPair(TextureSetIndex, TopologyRemapBufferTextureBinding);
+ }
+
internal bool TryGetOffset(StorageKind storageKind, int location, int component, out int offset)
{
return _offsets.TryGetValue(new IoDefinition(storageKind, IoVariable.UserDefined, location, component), out offset);