diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-06-12 09:26:49 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-06-12 09:26:49 -0300 |
| commit | 9176180abb119ff76c4f63eac09343faee686a18 (patch) | |
| tree | 602193af1beadb846c255f2de134dabe9144cabc /Ryujinx.Graphics | |
| parent | 133082cb6d06f5c86b2962644a6d72fe746c47ee (diff) | |
Minor shader fixes
Diffstat (limited to 'Ryujinx.Graphics')
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/GlslDecl.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs index 43a04813..4002c29a 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs @@ -159,7 +159,8 @@ namespace Ryujinx.Graphics.Gal.Shader case ShaderIrOperAbuf Abuf: { //This is a built-in input variable. - if (Abuf.Offs == VertexIdAttr) + if (Abuf.Offs == VertexIdAttr || + Abuf.Offs == InstanceIdAttr) { break; } diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index 71a53a5a..1bcedacb 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -975,7 +975,8 @@ namespace Ryujinx.Graphics.Gal.Shader switch (Node) { case ShaderIrOperAbuf Abuf: - return Abuf.Offs == GlslDecl.VertexIdAttr + return Abuf.Offs == GlslDecl.VertexIdAttr || + Abuf.Offs == GlslDecl.InstanceIdAttr ? OperType.I32 : OperType.F32; diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs index 3299ebab..a8ad5ec2 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.Gal.Shader for (int Index = 0; Index <= Size; Index++) { - Opers[Index] = new ShaderIrOperAbuf(Abuf, Reg); + Opers[Index] = new ShaderIrOperAbuf(Abuf + Index * 4, Reg); } return Opers; |
