Fix availability check for MTLCopyAllDevices
This caused failure on macOS 10.11 because Dawn decided Metal is supported but would go ahead and reach an UNREACHABLE() block. BUG=chromium:1006181 Change-Id: I20739a058adaa60a71ec489e07b36ebf48ef871a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11420 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
a9a84dfe1e
commit
38b295de38
|
@ -220,7 +220,7 @@ namespace dawn_native { namespace metal {
|
|||
std::vector<std::unique_ptr<AdapterBase>> Backend::DiscoverDefaultAdapters() {
|
||||
std::vector<std::unique_ptr<AdapterBase>> adapters;
|
||||
|
||||
if (@available(macOS 10.12, *)) {
|
||||
if (@available(macOS 10.11, *)) {
|
||||
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
||||
|
||||
for (id<MTLDevice> device in devices) {
|
||||
|
|
Loading…
Reference in New Issue