aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-04-30 14:32:54 -0300
committergdkchan <gab.dark.100@gmail.com>2018-04-30 14:32:54 -0300
commit5f0dd965bf18ec00856498c9b933a6b7c906994a (patch)
tree05bec6e8d11edd2c0c847e153f062816455a2884 /Ryujinx.Graphics/Gal/Shader
parent7cda630aba8b99b65379c0ef0e92483491e4fbb3 (diff)
Ignore ZR target texture color registers on shader
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader')
-rw-r--r--Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs
index 33f58231..24a61c0c 100644
--- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs
+++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs
@@ -68,9 +68,9 @@ namespace Ryujinx.Graphics.Gal.Shader
private static void EmitTex(ShaderIrBlock Block, long OpCode, ShaderIrInst Inst)
{
//TODO: Support other formats.
- ShaderIrNode OperA = GetOperGpr8 (OpCode);
- ShaderIrNode OperB = GetOperGpr20 (OpCode);
- ShaderIrNode OperC = GetOperImm13_36(OpCode);
+ ShaderIrNode OperA = GetOperGpr8 (OpCode);
+ ShaderIrNode OperB = GetOperGpr20 (OpCode);
+ ShaderIrNode OperC = GetOperImm13_36(OpCode);
for (int Ch = 0; Ch < 4; Ch++)
{
@@ -95,6 +95,11 @@ namespace Ryujinx.Graphics.Gal.Shader
Dst.Index += Ch & 1;
+ if (Dst.Index >= ShaderIrOperGpr.ZRIndex)
+ {
+ continue;
+ }
+
Block.AddNode(GetPredNode(new ShaderIrAsg(Dst, Src), OpCode));
}
}