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

@@ -129,6 +129,8 @@ namespace dawn_native {
AdapterDiscoveryOptionsBase(WGPUBackendType type);
};
enum BackendValidationLevel { Full, Partial, Disabled };
// Represents a connection to dawn_native and is used for dependency injection, discovering
// system adapters and injecting custom adapters (like a Swiftshader Vulkan adapter).
//
@@ -155,15 +157,13 @@ namespace dawn_native {
const ToggleInfo* GetToggleInfo(const char* toggleName);
// Enable backend's validation layers if it has.
// Enables backend validation layers
void EnableBackendValidation(bool enableBackendValidation);
void SetBackendValidationLevel(BackendValidationLevel validationLevel);
// Enable debug capture on Dawn startup
void EnableBeginCaptureOnStartup(bool beginCaptureOnStartup);
// Enable GPU based backend validation if it has.
void EnableGPUBasedBackendValidation(bool enableGPUBasedBackendValidation);
void SetPlatform(dawn_platform::Platform* platform);
// Returns the underlying WGPUInstance object.