瀏覽代碼

Fix NRE on gather operations with depth compare on macOS (#5832)

gdkchan 2 年之前
父節點
當前提交
33ba170315
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs

+ 4 - 1
src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs

@@ -766,7 +766,10 @@ namespace Ryujinx.Graphics.Shader.Instructions
                 flags |= offset == TexOffset.Ptp ? TextureFlags.Offsets : TextureFlags.Offset;
             }
 
-            sourcesList.Add(Const((int)component));
+            if (!hasDepthCompare)
+            {
+                sourcesList.Add(Const((int)component));
+            }
 
             Operand[] sources = sourcesList.ToArray();
             Operand[] dests = new Operand[BitOperations.PopCount((uint)componentMask)];