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>
This commit is contained in:
Bryan Bernhart 2021-04-26 18:26:36 +00:00 committed by Commit Bot service account
parent 3d71624bfd
commit e688e52e6c
3 changed files with 6 additions and 28 deletions

View File

@ -39,10 +39,8 @@ namespace dawn_native { namespace d3d12 {
functions->d3d12GetDebugInterface(IID_PPV_ARGS(&debugController)))) {
ASSERT(debugController != nullptr);
debugController->EnableDebugLayer();
if (validationLevel == BackendValidationLevel::Full) {
debugController->SetEnableGPUBasedValidation(true);
if (validationLevel == BackendValidationLevel::Partial) {
debugController->SetGPUBasedValidationFlags(
D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING);
}
// Enable additional debug layers.

View File

@ -255,7 +255,7 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
UNREACHABLE();
}
} else {
mBackendValidationLevel = dawn_native::BackendValidationLevel::Full;
mBackendValidationLevel = dawn_native::BackendValidationLevel::Partial;
}
continue;
}
@ -353,9 +353,9 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
" -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"

View File

@ -389,8 +389,6 @@ class CopyTextureForBrowserTests : public DawnTest {
// 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, PassthroughCopy) {
}
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, VerifyCopyOnXDirection) {
}
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, VerifyCopyOnYDirection) {
}
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, VerifyCopyFromLargeTexture) {
}
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, VerifyFlipY) {
}
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 @@ TEST_P(CopyTextureForBrowserTests, VerifyFlipYInSlimTexture) {
// 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 @@ TEST_P(CopyTextureForBrowserTests, FromRGBA8UnormCopy) {
// 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());