0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 03:25:46 +00:00

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

This commit is contained in:
gdkchan 2023-10-22 15:31:36 -03:00 committed by GitHub
parent 638be5f296
commit 33ba170315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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