D3D12: Disable GBV when using partial validation.
GBV's ability to patch shaders with validation code
was hanging several end2end tests. Since disabling
GBV shader patching would render partial validation
ineffective, partial validation was re-mapped to have
GBV disabled while full validation enables GBV by default.
End2end tests now default to partial validation so
tests that would otherwise not run with GBV can still
have some coverage.
BUG=dawn:592
Change-Id: Iafb271b5ee8862592152fa45c34f188d64432e60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46725
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Auto-Submit: Bryan Bernhart <bryan.bernhart@intel.com>
diff --git a/src/dawn_native/d3d12/BackendD3D12.cpp b/src/dawn_native/d3d12/BackendD3D12.cpp
index 5c0cca6..df61c2a 100644
--- a/src/dawn_native/d3d12/BackendD3D12.cpp
+++ b/src/dawn_native/d3d12/BackendD3D12.cpp
@@ -39,10 +39,8 @@
functions->d3d12GetDebugInterface(IID_PPV_ARGS(&debugController)))) {
ASSERT(debugController != nullptr);
debugController->EnableDebugLayer();
- debugController->SetEnableGPUBasedValidation(true);
- if (validationLevel == BackendValidationLevel::Partial) {
- debugController->SetGPUBasedValidationFlags(
- D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING);
+ if (validationLevel == BackendValidationLevel::Full) {
+ debugController->SetEnableGPUBasedValidation(true);
}
// Enable additional debug layers.
diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp
index 26bc121..b1c9691 100644
--- a/src/tests/DawnTest.cpp
+++ b/src/tests/DawnTest.cpp
@@ -255,7 +255,7 @@
UNREACHABLE();
}
} else {
- mBackendValidationLevel = dawn_native::BackendValidationLevel::Full;
+ mBackendValidationLevel = dawn_native::BackendValidationLevel::Partial;
}
continue;
}
@@ -353,9 +353,9 @@
" -w, --use-wire: Run the tests through the wire (defaults to no wire)\n"
" -c, --begin-capture-on-startup: Begin debug capture on startup "
"(defaults to no capture)\n"
- " --enable-backend-validation: Enables backend validation. Defaults to 'full'\n"
- " to enable all available backend validation. Set to 'partial' to\n"
- " enable a subset of backend validation with less performance overhead.\n"
+ " --enable-backend-validation: Enables backend validation. Defaults to \n"
+ " 'partial' to enable only minimum backend validation. Set to 'full' to\n"
+ " enable all available backend validation with less performance overhead.\n"
" Set to 'disabled' to run with no validation (same as no flag).\n"
" --enable-toggles: Comma-delimited list of Dawn toggles to enable.\n"
" ex.) skip_validation,use_tint_generator,disable_robustness,turn_off_vsync\n"
diff --git a/src/tests/end2end/CopyTextureForBrowserTests.cpp b/src/tests/end2end/CopyTextureForBrowserTests.cpp
index 5a71ea6..1580df2 100644
--- a/src/tests/end2end/CopyTextureForBrowserTests.cpp
+++ b/src/tests/end2end/CopyTextureForBrowserTests.cpp
@@ -389,8 +389,6 @@
// Verify CopyTextureForBrowserTests works with internal pipeline.
// The case do copy without any transform.
TEST_P(CopyTextureForBrowserTests, PassthroughCopy) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
constexpr uint32_t kWidth = 10;
constexpr uint32_t kHeight = 1;
@@ -402,9 +400,6 @@
}
TEST_P(CopyTextureForBrowserTests, VerifyCopyOnXDirection) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
-
constexpr uint32_t kWidth = 1000;
constexpr uint32_t kHeight = 1;
@@ -415,9 +410,6 @@
}
TEST_P(CopyTextureForBrowserTests, VerifyCopyOnYDirection) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
-
constexpr uint32_t kWidth = 1;
constexpr uint32_t kHeight = 1000;
@@ -428,8 +420,6 @@
}
TEST_P(CopyTextureForBrowserTests, VerifyCopyFromLargeTexture) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
constexpr uint32_t kWidth = 899;
constexpr uint32_t kHeight = 999;
@@ -441,9 +431,6 @@
}
TEST_P(CopyTextureForBrowserTests, VerifyFlipY) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
-
constexpr uint32_t kWidth = 901;
constexpr uint32_t kHeight = 1001;
@@ -456,9 +443,6 @@
}
TEST_P(CopyTextureForBrowserTests, VerifyFlipYInSlimTexture) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
-
constexpr uint32_t kWidth = 1;
constexpr uint32_t kHeight = 1001;
@@ -473,8 +457,6 @@
// Verify |CopyTextureForBrowser| doing color conversion correctly when
// the source texture is RGBA8Unorm format.
TEST_P(CopyTextureForBrowserTests, FromRGBA8UnormCopy) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// Skip OpenGLES backend because it fails on using RGBA8Unorm as
// source texture format.
DAWN_SKIP_TEST_IF(IsOpenGLES());
@@ -492,8 +474,6 @@
// Verify |CopyTextureForBrowser| doing color conversion correctly when
// the source texture is BGRAUnorm format.
TEST_P(CopyTextureForBrowserTests, FromBGRA8UnormCopy) {
- // Tests skip due to crbug.com/dawn/592.
- DAWN_SKIP_TEST_IF(IsD3D12() && IsBackendValidationEnabled());
// Skip OpenGLES backend because it fails on using BGRA8Unorm as
// source texture format.
DAWN_SKIP_TEST_IF(IsOpenGLES());