SDL_gpu_shadercross: Fix scrambled sampler order in some SPIRV->MSL cases

From 170b2a2c8dc51ff83f950d45eef6df27370a869f Mon Sep 17 00:00:00 2001
From: Andrei Alexeyev <[EMAIL REDACTED]>
Date: Sun, 6 Oct 2024 10:57:00 +0200
Subject: [PATCH] Fix scrambled sampler order in some SPIRV->MSL cases

---
 SDL_gpu_shadercross.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/SDL_gpu_shadercross.h b/SDL_gpu_shadercross.h
index 07f57f4..e4fe585 100644
--- a/SDL_gpu_shadercross.h
+++ b/SDL_gpu_shadercross.h
@@ -790,6 +790,8 @@ void *SDL_ShaderCross_CompileFromSPIRV(
         SDL_spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_HLSL_SHADER_MODEL, shadermodel);
         SDL_spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_HLSL_NONWRITABLE_UAV_TEXTURE_AS_SRV, 1);
         SDL_spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_HLSL_FLATTEN_MATRIX_VERTEX_INPUT_SEMANTICS, 1);
+    } else if (backend == SPVC_BACKEND_MSL) {
+        SDL_spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_MSL_ENABLE_DECORATION_BINDING, 1);
     }
 
     result = SDL_spvc_compiler_install_compiler_options(compiler, options);