Expand MTLCounterSets leak workaround to all non-Apple before OS 11
Bug: chromium:1480598
Change-Id: I171c5cb814e11c0b2a27b711af2cba3754755cd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/150581
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
diff --git a/src/dawn/native/metal/BackendMTL.mm b/src/dawn/native/metal/BackendMTL.mm
index 29caf35..8f7d833 100644
--- a/src/dawn/native/metal/BackendMTL.mm
+++ b/src/dawn/native/metal/BackendMTL.mm
@@ -445,8 +445,8 @@
// Intentionally leak counterSets to workaround an issue where the driver
// over-releases the handle if it is accessed more than once. It becomes a zombie.
// For more information, see crbug.com/1443658.
- // Appears to occur on Intel prior to MacOS 11, and continuing on Intel Gen 7 after
- // that OS version.
+ // Appears to occur on non-Apple prior to MacOS 11, and continuing on Intel Gen 7
+ // and Intel Gen 11 after that OS version.
uint32_t vendorId = GetVendorId();
uint32_t deviceId = GetDeviceId();
if (gpu_info::IsIntelGen7(vendorId, deviceId)) {
@@ -456,7 +456,7 @@
return true;
}
#if DAWN_PLATFORM_IS(MACOS)
- if (gpu_info::IsIntel(vendorId) && !IsMacOSVersionAtLeast(11)) {
+ if (!gpu_info::IsApple(vendorId) && !IsMacOSVersionAtLeast(11)) {
return true;
}
#endif