From b24e1320fc30a64c230420e9ba86d0f72201f58e Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Tue, 20 Jul 2021 20:48:10 +0000 Subject: [PATCH] Metal: Only call UpdateTimestampPeriod if the extension is enabled Bug: chromium:1226078 Change-Id: I75528096fe080aba4d8edd970d73e0aefa9130ee Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59041 Commit-Queue: Austin Eng Commit-Queue: Kai Ninomiya Auto-Submit: Austin Eng Reviewed-by: Kai Ninomiya --- src/dawn_native/metal/DeviceMTL.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn_native/metal/DeviceMTL.mm b/src/dawn_native/metal/DeviceMTL.mm index 0c392321ff..30e7f2a1db 100644 --- a/src/dawn_native/metal/DeviceMTL.mm +++ b/src/dawn_native/metal/DeviceMTL.mm @@ -286,7 +286,7 @@ namespace dawn_native { namespace metal { } // Just run timestamp period calculation when timestamp extension is enabled. - if (GetAdapter()->GetSupportedExtensions().IsEnabled(Extension::TimestampQuery)) { + if (IsExtensionEnabled(Extension::TimestampQuery)) { if (@available(macos 10.15, iOS 14.0, *)) { UpdateTimestampPeriod(GetMTLDevice(), mKalmanInfo.get(), &mCpuTimestamp, &mGpuTimestamp, &mTimestampPeriod);