aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-02-04 16:58:17 -0300
committerGitHub <noreply@github.com>2024-02-04 20:58:17 +0100
commitbbed3b99265ad03f8649ff2cc1300a135c0ba3f1 (patch)
tree39f638751a389e95a4b5dcd2c2dbadc626aa3a43 /src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
parent24c8b0edc06c986f1fca80f01244f83b5bb4346c (diff)
Fix depth compare value for TLD4S shader instruction with offset (#6253)1.1.1158
* Fix depth compare value for TLD4S shader instruction with offset * Shader cache version bump
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
index e9349542..06daa26a 100644
--- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
+++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
@@ -578,12 +578,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
type = SamplerType.Texture2D;
flags = TextureFlags.Gather;
- if (tld4sOp.Dc)
- {
- sourcesList.Add(Rb());
-
- type |= SamplerType.Shadow;
- }
+ int depthCompareIndex = sourcesList.Count;
if (tld4sOp.Aoffi)
{
@@ -592,7 +587,13 @@ namespace Ryujinx.Graphics.Shader.Instructions
flags |= TextureFlags.Offset;
}
- if (!tld4sOp.Dc)
+ if (tld4sOp.Dc)
+ {
+ sourcesList.Insert(depthCompareIndex, Rb());
+
+ type |= SamplerType.Shadow;
+ }
+ else
{
sourcesList.Add(Const((int)tld4sOp.TexComp));
}