aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-08 17:29:41 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit769c02235f489f02b1791e6e76dc8b3ab18028ee (patch)
treeef0a2ffc5030360d5cef78e7c67e131e44348d50 /Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs
parent1e8bc29f32cde08616175f8f87405dfa7b8c4025 (diff)
Add ATOMS, LDS, POPC, RED, STS and VOTE shader instructions, start changing the way how global memory is handled
Diffstat (limited to 'Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs b/Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs
new file mode 100644
index 00000000..374767bd
--- /dev/null
+++ b/Ryujinx.Graphics.Shader/Decoders/OpCodeVote.cs
@@ -0,0 +1,26 @@
+using Ryujinx.Graphics.Shader.Instructions;
+
+namespace Ryujinx.Graphics.Shader.Decoders
+{
+ class OpCodeVote : OpCode, IOpCodeRd, IOpCodePredicate39
+ {
+ public Register Rd { get; }
+ public Register Predicate39 { get; }
+ public Register Predicate45 { get; }
+
+ public VoteOp VoteOp { get; }
+
+ public bool InvertP { get; }
+
+ public OpCodeVote(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode)
+ {
+ Rd = new Register(opCode.Extract(0, 8), RegisterType.Gpr);
+ Predicate39 = new Register(opCode.Extract(39, 3), RegisterType.Predicate);
+ Predicate45 = new Register(opCode.Extract(45, 3), RegisterType.Predicate);
+
+ InvertP = opCode.Extract(42);
+
+ VoteOp = (VoteOp)opCode.Extract(48, 2);
+ }
+ }
+} \ No newline at end of file