aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Decoders
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-10-12 21:40:50 -0300
committerGitHub <noreply@github.com>2020-10-12 21:40:50 -0300
commitb066cfc1a3e31bf7197ddbd0f4d774b886cd9d65 (patch)
tree95a1d0bb640948c184857fd1bccb56cad90839fb /Ryujinx.Graphics.Shader/Decoders
parent14fd9aa640936d2455c9f0929fc904a5bdb2fada (diff)
Add support for shader constant buffer slot indexing (#1608)
* Add support for shader constant buffer slot indexing * Fix typo
Diffstat (limited to 'Ryujinx.Graphics.Shader/Decoders')
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/CbIndexMode.cs10
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/OpCodeLdc.cs4
2 files changed, 13 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Decoders/CbIndexMode.cs b/Ryujinx.Graphics.Shader/Decoders/CbIndexMode.cs
new file mode 100644
index 00000000..4c7a72b5
--- /dev/null
+++ b/Ryujinx.Graphics.Shader/Decoders/CbIndexMode.cs
@@ -0,0 +1,10 @@
+namespace Ryujinx.Graphics.Shader.Decoders
+{
+ enum CbIndexMode
+ {
+ Default = 0,
+ Il = 1,
+ Is = 2,
+ Isl = 3
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.Graphics.Shader/Decoders/OpCodeLdc.cs b/Ryujinx.Graphics.Shader/Decoders/OpCodeLdc.cs
index c18a0a9e..05bac28c 100644
--- a/Ryujinx.Graphics.Shader/Decoders/OpCodeLdc.cs
+++ b/Ryujinx.Graphics.Shader/Decoders/OpCodeLdc.cs
@@ -10,6 +10,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
public int Offset { get; }
public int Slot { get; }
+ public CbIndexMode IndexMode { get; }
public IntegerSize Size { get; }
public OpCodeLdc(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode)
@@ -20,7 +21,8 @@ namespace Ryujinx.Graphics.Shader.Decoders
Offset = (opCode.Extract(20, 16) << 16) >> 16;
Slot = opCode.Extract(36, 5);
- Size = (IntegerSize)opCode.Extract(48, 3);
+ IndexMode = (CbIndexMode)opCode.Extract(44, 2);
+ Size = (IntegerSize)opCode.Extract(48, 3);
}
}
} \ No newline at end of file