diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs index 63ecbc0aa9..8d288da3ed 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs @@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl return value.ToString(CultureInfo.InvariantCulture); } - return "0x" + value.ToString("X", CultureInfo.InvariantCulture); + return $"as_type(0x{value.ToString("X", CultureInfo.InvariantCulture)})"; } public static string FormatUint(uint value) @@ -86,7 +86,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl return value.ToString(CultureInfo.InvariantCulture) + "u"; } - return "0x" + value.ToString("X", CultureInfo.InvariantCulture) + "u"; + return $"as_type(0x{value.ToString("X", CultureInfo.InvariantCulture)})"; } } }