#include <webgpu/webgpu.h>
#include <algorithm>
#include <unordered_set>
#include <utility>
#include <vector>
#include "dawn/common/Assert.h"
#include "dawn/common/SystemUtils.h"
#include "dawn/dawn_proc.h"
#include "dawn/native/Adapter.h"
#include "dawn/native/NullBackend.h"
#include "dawn/tests/PartitionAllocSupport.h"
#include "dawn/tests/ToggleParser.h"
#include "dawn/tests/unittests/validation/ValidationTest.h"
#include "dawn/utils/WireHelper.h"
namespace {
bool gUseWire = …;
std::string gWireTraceDir = …;
std::unique_ptr<ToggleParser> gToggleParser = …;
static ValidationTest* gCurrentTest = …;
}
void InitDawnValidationTestEnvironment(int argc, char** argv) { … }
ValidationTest::ValidationTest() { … }
void ValidationTest::SetUp() { … }
ValidationTest::~ValidationTest() { … }
void ValidationTest::TearDown() { … }
void ValidationTest::StartExpectDeviceError(testing::Matcher<std::string> errorMatcher) { … }
void ValidationTest::StartExpectDeviceError() { … }
bool ValidationTest::EndExpectDeviceError() { … }
std::string ValidationTest::GetLastDeviceErrorMessage() const { … }
void ValidationTest::ExpectDeviceDestruction() { … }
bool ValidationTest::UsesWire() const { … }
void ValidationTest::FlushWire() { … }
void ValidationTest::WaitForAllOperations() { … }
const dawn::native::ToggleInfo* ValidationTest::GetToggleInfo(const char* name) const { … }
bool ValidationTest::HasToggleEnabled(const char* toggle) const { … }
wgpu::SupportedLimits ValidationTest::GetSupportedLimits() const { … }
bool ValidationTest::AllowUnsafeAPIs() { … }
std::vector<wgpu::FeatureName> ValidationTest::GetRequiredFeatures() { … }
std::vector<const char*> ValidationTest::GetEnabledToggles() { … }
std::vector<const char*> ValidationTest::GetDisabledToggles() { … }
dawn::utils::WireHelper* ValidationTest::GetWireHelper() const { … }
uint32_t ValidationTest::GetDeviceCreationDeprecationWarningExpectation(
const wgpu::DeviceDescriptor& descriptor) { … }
wgpu::Device ValidationTest::RequestDeviceSync(const wgpu::DeviceDescriptor& deviceDesc) { … }
dawn::native::Adapter& ValidationTest::GetBackendAdapter() { … }
void ValidationTest::SetUp(const wgpu::InstanceDescriptor* nativeDesc,
const wgpu::InstanceDescriptor* wireDesc) { … }
bool ValidationTest::UseCompatibilityMode() const { … }
ValidationTest::PlaceholderRenderPass::PlaceholderRenderPass(const wgpu::Device& device)
: … { … }