Disable timestamp query on macOS 10.15 on AMD
On macOS 10.15 on AMD GPU, WriteTimestamp cannot be called without any copy commands on MTLBlitCommandEncoder, otherwise crash occurs. But this issue is not reproduced on macOS 11.0, just disable timestamp query on the bad version on AMD. BUG: dawn:545 Change-Id: I69a012b2091b8ccd251d23ddb26b72e06c07492f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53581 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
parent
c9a6df3297
commit
b68ca071f3
|
@ -221,9 +221,14 @@ namespace dawn_native { namespace metal {
|
||||||
if ([*mDevice supportsFamily:MTLGPUFamilyMac2] ||
|
if ([*mDevice supportsFamily:MTLGPUFamilyMac2] ||
|
||||||
[*mDevice supportsFamily:MTLGPUFamilyApple5]) {
|
[*mDevice supportsFamily:MTLGPUFamilyApple5]) {
|
||||||
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
|
mSupportedExtensions.EnableExtension(Extension::PipelineStatisticsQuery);
|
||||||
// TODO(crbug.com/dawn/545): Crash occurs if we only call WriteTimestamp in a
|
|
||||||
// command encoder without any copy commands on Metal on AMD GPU.
|
// Disable timestamp query on macOS 10.15 on AMD GPU because WriteTimestamp
|
||||||
mSupportedExtensions.EnableExtension(Extension::TimestampQuery);
|
// fails to call without any copy commands on MTLBlitCommandEncoder. This issue
|
||||||
|
// has been fixed on macOS 11.0. See crbug.com/dawn/545
|
||||||
|
if (!gpu_info::IsAMD(GetPCIInfo().vendorId) ||
|
||||||
|
[NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:{11, 0, 0}]) {
|
||||||
|
mSupportedExtensions.EnableExtension(Extension::TimestampQuery);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (@available(macOS 10.11, iOS 11.0, *)) {
|
if (@available(macOS 10.11, iOS 11.0, *)) {
|
||||||
|
|
|
@ -534,10 +534,6 @@ TEST_P(TimestampQueryTests, QuerySetCreation) {
|
||||||
|
|
||||||
// Test calling timestamp query from command encoder
|
// Test calling timestamp query from command encoder
|
||||||
TEST_P(TimestampQueryTests, TimestampOnCommandEncoder) {
|
TEST_P(TimestampQueryTests, TimestampOnCommandEncoder) {
|
||||||
// TODO(crbug.com/dawn/545): Crash occurs if we only call WriteTimestamp in a command encoder
|
|
||||||
// without any copy commands on Metal on AMD GPU.
|
|
||||||
DAWN_SUPPRESS_TEST_IF(IsMetal() && IsAMD());
|
|
||||||
|
|
||||||
constexpr uint32_t kQueryCount = 2;
|
constexpr uint32_t kQueryCount = 2;
|
||||||
|
|
||||||
// Write timestamp with different query indexes
|
// Write timestamp with different query indexes
|
||||||
|
@ -760,10 +756,6 @@ TEST_P(TimestampQueryTests, ResolveToBufferWithOffset) {
|
||||||
// the issue is fixed.
|
// the issue is fixed.
|
||||||
DAWN_SUPPRESS_TEST_IF(IsWindows() && IsVulkan() && IsIntel());
|
DAWN_SUPPRESS_TEST_IF(IsWindows() && IsVulkan() && IsIntel());
|
||||||
|
|
||||||
// TODO(crbug.com/dawn/545): Crash occurs if we only call WriteTimestamp in a command encoder
|
|
||||||
// without any copy commands on Metal on AMD GPU.
|
|
||||||
DAWN_SUPPRESS_TEST_IF(IsMetal() && IsAMD());
|
|
||||||
|
|
||||||
constexpr uint32_t kQueryCount = 2;
|
constexpr uint32_t kQueryCount = 2;
|
||||||
constexpr uint64_t kZero = 0;
|
constexpr uint64_t kZero = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue