From 66f68e08a3b2b5b3edb0fa42d6297de95a1a9e59 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 30 May 2024 02:23:37 +0100 Subject: [PATCH] Fix sample-less reads with lod --- .../CodeGen/Msl/Instructions/InstGenMemory.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs index daf01db04..652b13ee9 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/Instructions/InstGenMemory.cs @@ -293,7 +293,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions if (hasLodLevel) { - Append($"level({Src(coordType)})"); + if (intCoords) + { + Append(Src(coordType)); + } + else + { + Append($"level({Src(coordType)})"); + } } // TODO: Support offsets