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/ShaderDecodeSpecial.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/ShaderDecodeSpecial.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeSpecial.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeSpecial.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeSpecial.cs new file mode 100644 index 00000000..591631ff --- /dev/null +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeSpecial.cs @@ -0,0 +1,29 @@ +using System; + +using static Ryujinx.Graphics.Gal.Shader.ShaderDecodeHelper; + +namespace Ryujinx.Graphics.Gal.Shader +{ + static partial class ShaderDecode + { + public static void Out_R(ShaderIrBlock Block, long OpCode) + { + //TODO: Those registers have to be used for something + ShaderIrOperGpr Gpr0 = GetOperGpr0(OpCode); + ShaderIrOperGpr Gpr8 = GetOperGpr8(OpCode); + ShaderIrOperGpr Gpr20 = GetOperGpr20(OpCode); + + int Type = (int)((OpCode >> 39) & 3); + + if ((Type & 1) != 0) + { + Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Emit), OpCode)); + } + + if ((Type & 2) != 0) + { + Block.AddNode(GetPredNode(new ShaderIrOp(ShaderIrInst.Cut), OpCode)); + } + } + } +}
\ No newline at end of file |
