Report metal3 GPU common family as GPU architecture on macOS
Change-Id: I8ce10a9e74f9017cf3fa6208c872f9f39ba396a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/220954
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Fr <beaufort.francois@gmail.com>
diff --git a/src/dawn/native/metal/PhysicalDeviceMTL.mm b/src/dawn/native/metal/PhysicalDeviceMTL.mm
index 7d970a4..166f38f 100644
--- a/src/dawn/native/metal/PhysicalDeviceMTL.mm
+++ b/src/dawn/native/metal/PhysicalDeviceMTL.mm
@@ -794,7 +794,13 @@
// So we'll use the highest supported common family as the reported "architecture" on
// devices where a deviceID isn't available.
if (mDeviceId == 0) {
- if ([*mDevice supportsFamily:MTLGPUFamilyCommon3]) {
+ if (@available(macOS 13.0, iOS 16.0, *)) {
+ // TODO(crbug.com/380316939): Replace the cast with MTLGPUFamilyMetal3 when
+ // available.
+ if ([*mDevice supportsFamily:static_cast<::MTLGPUFamily>(5001)]) {
+ mArchitectureName = "metal-3";
+ }
+ } else if ([*mDevice supportsFamily:MTLGPUFamilyCommon3]) {
mArchitectureName = "common-3";
} else if ([*mDevice supportsFamily:MTLGPUFamilyCommon2]) {
mArchitectureName = "common-2";