diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-10-26 14:50:52 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 8cba252b238ee6cf6599ad2fc57793e6f76c5e2e (patch) | |
| tree | 5ee98eb374a46e210d4a960f5e1d58b42b3f27eb /Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs | |
| parent | 1b7d95519569639135a68e7ebda5148f3263217c (diff) | |
Add per-source type memory change tracking, simplified state change tracking, other fixes
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs index f66ebc9f..b9bb18d9 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitMove.cs @@ -27,6 +27,20 @@ namespace Ryujinx.Graphics.Shader.Instructions switch (sysReg) { + case SystemRegister.ThreadId: + { + Operand tidX = Attribute(AttributeConsts.ThreadIdX); + Operand tidY = Attribute(AttributeConsts.ThreadIdY); + Operand tidZ = Attribute(AttributeConsts.ThreadIdZ); + + tidY = context.ShiftLeft(tidY, Const(16)); + tidZ = context.ShiftLeft(tidZ, Const(26)); + + src = context.BitwiseOr(tidX, context.BitwiseOr(tidY, tidZ)); + + break; + } + case SystemRegister.ThreadIdX: src = Attribute(AttributeConsts.ThreadIdX); break; case SystemRegister.ThreadIdY: src = Attribute(AttributeConsts.ThreadIdY); break; case SystemRegister.ThreadIdZ: src = Attribute(AttributeConsts.ThreadIdZ); break; |
