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:
Corentin Wallez 2019-09-20 17:40:53 +00:00 committed by Commit Bot service account
parent a9a84dfe1e
commit 38b295de38
1 changed files with 1 additions and 1 deletions

View File

@ -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) {