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>
This commit is contained in:
Austin Eng 2022-02-05 03:30:05 +00:00 committed by Dawn LUCI CQ
parent aafb861973
commit 377ead9d44
1 changed files with 5 additions and 4 deletions

View File

@ -307,11 +307,12 @@ namespace dawn::native::metal {
bool enableTimestampQuery = true; bool enableTimestampQuery = true;
#if defined(DAWN_PLATFORM_MACOS) #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 // fails to call without any copy commands on MTLBlitCommandEncoder. This issue
// has been fixed on macOS 11.0. See crbug.com/dawn/545 // has been fixed on macOS 11.0. See crbug.com/dawn/545.
enableTimestampQuery &= if (gpu_info::IsAMD(mVendorId) && !IsMacOSVersionAtLeast(11)) {
!(gpu_info::IsAMD(mVendorId) && IsMacOSVersionAtLeast(11)); enableTimestampQuery = false;
}
#endif #endif
if (enableTimestampQuery) { if (enableTimestampQuery) {