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 <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Austin Eng 2021-07-20 20:48:10 +00:00 committed by Dawn LUCI CQ
parent 45aed4ba2e
commit b24e1320fc
1 changed files with 1 additions and 1 deletions

View File

@ -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);