From 20e3e34ce76bf6c0219d1e16b33f28b4afd7c825 Mon Sep 17 00:00:00 2001 From: Le Hoang Quyen Date: Tue, 25 Apr 2023 09:08:34 +0000 Subject: [PATCH] Disable some whitebox tests if implicit device sync is enabled. Whitebox tests call internal functions directly. However, when implicit device synchronization feature is turned on, some of these functions will expect that the device is already locked. Thus leading to assertion failures. So we need to disable the tests when this feature is turned on. Bug: dawn:1662 Change-Id: I1d65b4779c933313b5835f1bddbc57703b3ced53 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127180 Reviewed-by: Corentin Wallez Kokoro: Kokoro Commit-Queue: Quyen Le --- src/dawn/tests/white_box/QueryInternalShaderTests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dawn/tests/white_box/QueryInternalShaderTests.cpp b/src/dawn/tests/white_box/QueryInternalShaderTests.cpp index 296bbaaf91..ae8562372a 100644 --- a/src/dawn/tests/white_box/QueryInternalShaderTests.cpp +++ b/src/dawn/tests/white_box/QueryInternalShaderTests.cpp @@ -89,6 +89,12 @@ class QueryInternalShaderTests : public DawnTest { DAWN_TEST_UNSUPPORTED_IF(UsesWire()); DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_timestamp_query_conversion")); + + // If implicit device synchronization is turned on, EncodeConvertTimestampsToNanoseconds + // will expect the device to be locked. But we are calling it directly without going through + // wgpu API, hence the device won't be locked on this route. This would lead to assertion + // failure. So disable the test if this feature is turned on. + DAWN_TEST_UNSUPPORTED_IF(IsImplicitDeviceSyncEnabled()); } // Original timestamp values in query set for testing