Add Backend Validation Levels Option to Dawn Tests

Refactors DawnTest's backend validation options to use an enum, as well
as adds the 'partial' option enable backend validation with a
reduced performance overhead to address TDR issues on the bots.

Bug: dawn:598
Change-Id: I759eff03bd117f1f20ad82aa2b71a87834f42b1d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40000
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Brandon Jones
2021-02-04 19:32:12 +00:00
committed by Commit Bot service account
parent ef369b9ffc
commit bdbf98afca
7 changed files with 77 additions and 51 deletions

View File

@@ -195,20 +195,16 @@ namespace dawn_native {
return false;
}
void InstanceBase::EnableBackendValidation(bool enableBackendValidation) {
mEnableBackendValidation = enableBackendValidation;
}
bool InstanceBase::IsBackendValidationEnabled() const {
return mEnableBackendValidation;
return mBackendValidationLevel != BackendValidationLevel::Disabled;
}
void InstanceBase::EnableGPUBasedBackendValidation(bool enableGPUBasedBackendValidation) {
mEnableGPUValidation = enableGPUBasedBackendValidation;
void InstanceBase::SetBackendValidationLevel(BackendValidationLevel level) {
mBackendValidationLevel = level;
}
bool InstanceBase::IsGPUBasedBackendValidationEnabled() const {
return mEnableGPUValidation;
BackendValidationLevel InstanceBase::GetBackendValidationLevel() const {
return mBackendValidationLevel;
}
void InstanceBase::EnableBeginCaptureOnStartup(bool beginCaptureOnStartup) {