Skip to content

Commit

Permalink
sdlgpu: Avoid ShaderCross for Metal as well
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Jan 6, 2025
1 parent fef8d2f commit 66c85e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mojoshader_sdlgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ MOJOSHADER_sdlContext *MOJOSHADER_sdlCreateContext(
{
resultCtx->profile = (shader_format == SDL_GPU_SHADERFORMAT_SPIRV) ? "spirv" : "metal";

// We only care about ShaderCross if the device doesn't natively support SPIR-V
if (!(SDL_GetGPUShaderFormats(device) & SDL_GPU_SHADERFORMAT_SPIRV))
// We only care about ShaderCross if the device doesn't natively support the profile
if (!(SDL_GetGPUShaderFormats(device) & shader_format))
{
SDL_shadercross_lib = SDL_LoadObject(SDL_SHADERCROSS_LIB_NAME);
if (SDL_shadercross_lib != NULL)
Expand Down

0 comments on commit 66c85e9

Please sign in to comment.