Reenable timestamp queries on Metal macOS 11
They were previously disabled due to some new Metal alignement constraint that has now been upstreamed in WebGPU and implemented in Dawn. So we can reenable them. Bug: dawn:940 Change-Id: I96e5ac57342fbc0cab09989fe90a6bc4c8f9f40d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66120 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Hao Li <hao.x.li@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
2d1762049b
commit
008cba9b29
|
@ -296,15 +296,16 @@ namespace dawn_native { namespace metal {
|
||||||
|
|
||||||
if (IsGPUCounterSupported(*mDevice, MTLCommonCounterSetTimestamp,
|
if (IsGPUCounterSupported(*mDevice, MTLCommonCounterSetTimestamp,
|
||||||
{MTLCommonCounterTimestamp})) {
|
{MTLCommonCounterTimestamp})) {
|
||||||
|
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 10.15 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
|
||||||
BOOL enableTimestampQuery = !gpu_info::IsAMD(GetPCIInfo().vendorId);
|
enableTimestampQuery &=
|
||||||
#if defined(DAWN_PLATFORM_MACOS)
|
!(gpu_info::IsAMD(GetPCIInfo().vendorId) && IsMacOSVersionAtLeast(11));
|
||||||
// TODO(crbug.com/dawn/940): Disable timestamp query on macOS 11.0+. Need to
|
|
||||||
// figure out what to do with dstOffset alignment on that system.
|
|
||||||
enableTimestampQuery &= !IsMacOSVersionAtLeast(11);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (enableTimestampQuery) {
|
if (enableTimestampQuery) {
|
||||||
mSupportedFeatures.EnableFeature(Feature::TimestampQuery);
|
mSupportedFeatures.EnableFeature(Feature::TimestampQuery);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue