From 362672ae12a5f87b20241f37c9a22a27574931fd 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