diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-01-12 18:52:13 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-13 08:52:13 +1100 |
| commit | 36c6e67df2c06e1b71d2059461ed7fad17bfea34 (patch) | |
| tree | 2e05b13ff49f3e9a0b7b650ae01f612c7c700057 /Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs | |
| parent | df820a72def62319fe97236a2006c64bfb7c065a (diff) | |
Implement shader CC mode for ISCADD, X mode for ISETP and fix STL/STS/STG with RZ (#1901)
* Implement shader CC mode for ISCADD, X mode for ISETP and fix STS/STG with RZ
* Fix STG too and bump shader cache version
* Fix wrong name
* Fix Carry being inverted on comparison
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs index 63f9cff7..81d5c7af 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitMemory.cs @@ -501,7 +501,9 @@ namespace Ryujinx.Graphics.Shader.Instructions for (int index = 0; index < count; index++) { - Register rd = new Register(op.Rd.Index + index, RegisterType.Gpr); + bool isRz = op.Rd.IsRZ; + + Register rd = new Register(isRz ? op.Rd.Index : op.Rd.Index + index, RegisterType.Gpr); Operand value = Register(rd); @@ -525,11 +527,6 @@ namespace Ryujinx.Graphics.Shader.Instructions case MemoryRegion.Local: context.StoreLocal (offset, value); break; case MemoryRegion.Shared: context.StoreShared(offset, value); break; } - - if (rd.IsRZ) - { - break; - } } } @@ -547,7 +544,9 @@ namespace Ryujinx.Graphics.Shader.Instructions for (int index = 0; index < count; index++) { - Register rd = new Register(op.Rd.Index + index, RegisterType.Gpr); + bool isRz = op.Rd.IsRZ; + + Register rd = new Register(isRz ? op.Rd.Index : op.Rd.Index + index, RegisterType.Gpr); Operand value = Register(rd); @@ -559,11 +558,6 @@ namespace Ryujinx.Graphics.Shader.Instructions } context.StoreGlobal(context.IAdd(addrLow, Const(index * 4)), addrHigh, value); - - if (rd.IsRZ) - { - break; - } } } |
