Skip to content

Commit 4a1c1c4

Browse files
committed
Merge pull request #110873 from stuartcarnie/fix_metal_baker
Metal: Fix Metal compiler version inspection
2 parents 31b25d5 + d93fe90 commit 4a1c1c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/metal/rendering_shader_container_metal.mm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
break;
102102
}
103103

104-
Vector<String> parts{ "echo", R"("")", "|", "/usr/bin/xcrun", "-sdk", sdk, "metal", "-E", "-dM", "-x", "metal", "-", "|", "grep", "-E", R"(\"__METAL_VERSION__|__ENVIRONMENT_OS\")" };
104+
Vector<String> parts{ "echo", R"("")", "|", "/usr/bin/xcrun", "-sdk", sdk, "metal", "-E", "-dM", "-x", "metal" };
105105

106106
// Compile metal shaders for the minimum supported target instead of the host machine
107107
if (min_os_version.is_valid()) {
@@ -117,7 +117,8 @@
117117
}
118118
}
119119

120-
String s = " ";
120+
parts.append_array({ "-", "|", "grep", "-E", R"(\"__METAL_VERSION__|__ENVIRONMENT_OS\")" });
121+
121122
List<String> args = { "-c", String(" ").join(parts) };
122123

123124
String r_pipe;
@@ -147,8 +148,6 @@
147148
break;
148149
}
149150
}
150-
151-
return;
152151
}
153152

154153
Error RenderingShaderContainerMetal::compile_metal_source(const char *p_source, const StageData &p_stage_data, Vector<uint8_t> &r_binary_data) {

0 commit comments

Comments
 (0)