diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-07-19 02:33:27 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-07-19 02:33:27 -0300 |
| commit | cd203e98f2bed076798972da1d108bb64b1884ec (patch) | |
| tree | 691de94399ec3720e7b952543ab9cef80e839c5f /Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs | |
| parent | bdb6cbb43514f6d8eb96847a22b70709ae705827 (diff) | |
Implement Geometry shaders (#280)
* Implement Geometry shaders
* Add EmitVertex() and EndPrimitive()
* Read output geometry data from header
* Stub Vmad
* Add Iadd_I32
* Stub Mov_S (S2R)
* Stub Isberd
* Change vertex index to gpr39 in Abuf
* Add stub messages for consistency
* Do not print input block when there is no attributes
* Use GL_ARB_enhanced_layouts
* Skip geometry shaders when there's no GL_ARB_enhanced_layouts
* Address feedback
* Address feedback
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs index 1f1b158e..7d7b2f6c 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs @@ -7,14 +7,15 @@ namespace Ryujinx.Graphics.Gal.Shader public static ShaderIrOperAbuf[] GetOperAbuf20(long OpCode) { int Abuf = (int)(OpCode >> 20) & 0x3ff; - int Reg = (int)(OpCode >> 39) & 0xff; int Size = (int)(OpCode >> 47) & 3; + ShaderIrOperGpr Vertex = GetOperGpr39(OpCode); + ShaderIrOperAbuf[] Opers = new ShaderIrOperAbuf[Size + 1]; for (int Index = 0; Index <= Size; Index++) { - Opers[Index] = new ShaderIrOperAbuf(Abuf + Index * 4, Reg); + Opers[Index] = new ShaderIrOperAbuf(Abuf + Index * 4, Vertex); } return Opers; @@ -23,9 +24,8 @@ namespace Ryujinx.Graphics.Gal.Shader public static ShaderIrOperAbuf GetOperAbuf28(long OpCode) { int Abuf = (int)(OpCode >> 28) & 0x3ff; - int Reg = (int)(OpCode >> 39) & 0xff; - return new ShaderIrOperAbuf(Abuf, Reg); + return new ShaderIrOperAbuf(Abuf, GetOperGpr39(OpCode)); } public static ShaderIrOperCbuf GetOperCbuf34(long OpCode) |
