Fix version check for timestamp queries - Mac 11.0+ AMD Bug: dawn:545 Change-Id: I7cb48813e0a582a6b7314c6fa726800b146ea6be Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79243 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/src/dawn/native/metal/BackendMTL.mm b/src/dawn/native/metal/BackendMTL.mm index 8650fe8..52bcda7 100644 --- a/src/dawn/native/metal/BackendMTL.mm +++ b/src/dawn/native/metal/BackendMTL.mm
@@ -307,11 +307,12 @@ bool enableTimestampQuery = true; #if defined(DAWN_PLATFORM_MACOS) - // Disable timestamp query on macOS 10.15 on AMD GPU because WriteTimestamp + // Disable timestamp query on < macOS 11.0 on AMD GPU because WriteTimestamp // fails to call without any copy commands on MTLBlitCommandEncoder. This issue - // has been fixed on macOS 11.0. See crbug.com/dawn/545 - enableTimestampQuery &= - !(gpu_info::IsAMD(mVendorId) && IsMacOSVersionAtLeast(11)); + // has been fixed on macOS 11.0. See crbug.com/dawn/545. + if (gpu_info::IsAMD(mVendorId) && !IsMacOSVersionAtLeast(11)) { + enableTimestampQuery = false; + } #endif if (enableTimestampQuery) {