mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Metal: Call terminate if display initialization fails.
This ensures that any resources that were partially initialized are cleaned up. This is a speculative fix for dual GPU macs not falling back to the low power GPU. DisplayMtl leaks the metal device if it fails to initialize due to unsupported GPU families or vendors. Bug: chromium:1322521 Change-Id: I93930de8c07bb94318ac41c67513a3b1c8bd3bf0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681842 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
committed by
Angle LUCI CQ
parent
8f76a7ebf6
commit
cc8ea4c29a
@@ -114,6 +114,7 @@ egl::Error DisplayMtl::initialize(egl::Display *display)
|
||||
angle::Result result = initializeImpl(display);
|
||||
if (result != angle::Result::Continue)
|
||||
{
|
||||
terminate();
|
||||
return egl::EglNotInitialized();
|
||||
}
|
||||
return egl::NoError();
|
||||
|
||||
Reference in New Issue
Block a user