You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #110873 from stuartcarnie/fix_metal_baker
Metal: Fix Metal compiler version inspection
This commit is contained in:
@@ -101,7 +101,7 @@ void RenderingShaderContainerMetal::_initialize_toolchain_properties() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<String> parts{ "echo", R"("")", "|", "/usr/bin/xcrun", "-sdk", sdk, "metal", "-E", "-dM", "-x", "metal", "-", "|", "grep", "-E", R"(\"__METAL_VERSION__|__ENVIRONMENT_OS\")" };
|
Vector<String> parts{ "echo", R"("")", "|", "/usr/bin/xcrun", "-sdk", sdk, "metal", "-E", "-dM", "-x", "metal" };
|
||||||
|
|
||||||
// Compile metal shaders for the minimum supported target instead of the host machine
|
// Compile metal shaders for the minimum supported target instead of the host machine
|
||||||
if (min_os_version.is_valid()) {
|
if (min_os_version.is_valid()) {
|
||||||
@@ -117,7 +117,8 @@ void RenderingShaderContainerMetal::_initialize_toolchain_properties() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String s = " ";
|
parts.append_array({ "-", "|", "grep", "-E", R"(\"__METAL_VERSION__|__ENVIRONMENT_OS\")" });
|
||||||
|
|
||||||
List<String> args = { "-c", String(" ").join(parts) };
|
List<String> args = { "-c", String(" ").join(parts) };
|
||||||
|
|
||||||
String r_pipe;
|
String r_pipe;
|
||||||
@@ -147,8 +148,6 @@ void RenderingShaderContainerMetal::_initialize_toolchain_properties() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Error RenderingShaderContainerMetal::compile_metal_source(const char *p_source, const StageData &p_stage_data, Vector<uint8_t> &r_binary_data) {
|
Error RenderingShaderContainerMetal::compile_metal_source(const char *p_source, const StageData &p_stage_data, Vector<uint8_t> &r_binary_data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user