Skip to content

Commit 54997fb

Browse files
Merge pull request #2193 from KhronosGroup/fix-2192
MSL: Workaround bizarre crash on macOS.
2 parents 7ba6f5c + b17dd58 commit 54997fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

spirv_msl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12740,7 +12740,7 @@ void CompilerMSL::entry_point_args_builtin(string &ep_args)
1274012740
else
1274112741
ep_args += builtin_type_decl(bi_type, var_id) + " " + to_expression(var_id);
1274212742

12743-
ep_args += " [[" + builtin_qualifier(bi_type);
12743+
ep_args += string(" [[") + builtin_qualifier(bi_type);
1274412744
if (bi_type == BuiltInSampleMask && get_entry_point().flags.get(ExecutionModePostDepthCoverage))
1274512745
{
1274612746
if (!msl_options.supports_msl_version(2))
@@ -16222,8 +16222,8 @@ string CompilerMSL::built_in_func_arg(BuiltIn builtin, bool prefix_comma)
1622216222
// Handle HLSL-style 0-based vertex/instance index.
1622316223
builtin_declaration = true;
1622416224
bi_arg += builtin_type_decl(builtin);
16225-
bi_arg += " " + builtin_to_glsl(builtin, StorageClassInput);
16226-
bi_arg += " [[" + builtin_qualifier(builtin) + "]]";
16225+
bi_arg += string(" ") + builtin_to_glsl(builtin, StorageClassInput);
16226+
bi_arg += string(" [[") + builtin_qualifier(builtin) + string("]]");
1622716227
builtin_declaration = false;
1622816228

1622916229
return bi_arg;

0 commit comments

Comments
 (0)