Backends: SDL_GPU3: use MSL on macOS and MetalLib on iOS to fix shader compatibility. (#9076)

Edit original PR to keep metallib shader binary since next commit is going to use them.
This commit is contained in:
Leon Lysak
2025-11-26 14:51:22 +01:00
committed by ocornut
parent 285e3042ba
commit fd887f5241
5 changed files with 55 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ int main(int, char**)
SDL_ShowWindow(window);
// Create GPU Device
SDL_GPUDevice* gpu_device = SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_METALLIB,true,nullptr);
SDL_GPUDevice* gpu_device = SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL | SDL_GPU_SHADERFORMAT_METALLIB, true, nullptr);
if (gpu_device == nullptr)
{
printf("Error: SDL_CreateGPUDevice(): %s\n", SDL_GetError());