You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Metal: Stable argument buffers; GPU rendering crashes; visionOS exports
Supersedes #110683
This commit is contained in:
@@ -35,19 +35,23 @@
|
||||
RenderingShaderContainerFormat *ShaderBakerExportPluginPlatformMetal::create_shader_container_format(const Ref<EditorExportPlatform> &p_platform, const Ref<EditorExportPreset> &p_preset) {
|
||||
const String &os_name = p_platform->get_os_name();
|
||||
const MetalDeviceProfile *profile;
|
||||
String min_os_version;
|
||||
MinOsVersion min_os_version;
|
||||
|
||||
if (os_name == U"macOS") {
|
||||
profile = MetalDeviceProfile::get_profile(MetalDeviceProfile::Platform::macOS, MetalDeviceProfile::GPU::Apple7);
|
||||
min_os_version = (String)p_preset->get("application/min_macos_version_arm64");
|
||||
// Godot metal doesn't support x86_64 mac so no need to worry about that version
|
||||
min_os_version = p_preset->get("application/min_macos_version_arm64");
|
||||
profile = MetalDeviceProfile::get_profile(MetalDeviceProfile::Platform::macOS, MetalDeviceProfile::GPU::Apple7, min_os_version);
|
||||
} else if (os_name == U"iOS") {
|
||||
profile = MetalDeviceProfile::get_profile(MetalDeviceProfile::Platform::iOS, MetalDeviceProfile::GPU::Apple7);
|
||||
min_os_version = p_preset->get("application/min_ios_version");
|
||||
min_os_version = (String)p_preset->get("application/min_ios_version");
|
||||
profile = MetalDeviceProfile::get_profile(MetalDeviceProfile::Platform::iOS, MetalDeviceProfile::GPU::Apple7, min_os_version);
|
||||
} else if (os_name == U"visionOS") {
|
||||
min_os_version = (String)p_preset->get("application/min_visionos_version");
|
||||
profile = MetalDeviceProfile::get_profile(MetalDeviceProfile::Platform::visionOS, MetalDeviceProfile::GPU::Apple8, min_os_version);
|
||||
} else {
|
||||
ERR_FAIL_V_MSG(nullptr, vformat("Unsupported platform: %s", os_name));
|
||||
}
|
||||
return memnew(RenderingShaderContainerFormatMetal(profile, true, min_os_version));
|
||||
ERR_FAIL_NULL_V(profile, nullptr);
|
||||
return memnew(RenderingShaderContainerFormatMetal(profile, true));
|
||||
}
|
||||
|
||||
bool ShaderBakerExportPluginPlatformMetal::matches_driver(const String &p_driver) {
|
||||
|
||||
Reference in New Issue
Block a user