Make unittests and fuzzers use webgpu.h

BUG=dawn:22

Change-Id: Iff5465ad7a9456f9c6b2ee380af748b3afc129b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12741
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2019-10-28 22:15:47 +00:00
committed by Commit Bot service account
parent cab352c2f6
commit 45b51f5df7
40 changed files with 2200 additions and 2200 deletions

View File

@@ -15,9 +15,9 @@
#ifndef TESTS_UNITTESTS_VALIDATIONTEST_H_
#define TESTS_UNITTESTS_VALIDATIONTEST_H_
#include "gtest/gtest.h"
#include "dawn/dawncpp.h"
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "gtest/gtest.h"
#define ASSERT_DEVICE_ERROR(statement) \
StartExpectDeviceError(); \
@@ -29,7 +29,7 @@ class ValidationTest : public testing::Test {
ValidationTest();
~ValidationTest();
dawn::Device CreateDeviceFromAdapter(dawn_native::Adapter adapter,
wgpu::Device CreateDeviceFromAdapter(dawn_native::Adapter adapter,
const std::vector<const char*>& requiredExtensions);
void TearDown() override;
@@ -40,25 +40,25 @@ class ValidationTest : public testing::Test {
// Helper functions to create objects to test validation.
struct DummyRenderPass : public dawn::RenderPassDescriptor {
struct DummyRenderPass : public wgpu::RenderPassDescriptor {
public:
DummyRenderPass(const dawn::Device& device);
dawn::Texture attachment;
dawn::TextureFormat attachmentFormat;
DummyRenderPass(const wgpu::Device& device);
wgpu::Texture attachment;
wgpu::TextureFormat attachmentFormat;
uint32_t width;
uint32_t height;
private:
dawn::RenderPassColorAttachmentDescriptor mColorAttachment;
wgpu::RenderPassColorAttachmentDescriptor mColorAttachment;
};
protected:
dawn::Device device;
wgpu::Device device;
dawn_native::Adapter adapter;
std::unique_ptr<dawn_native::Instance> instance;
private:
static void OnDeviceError(DawnErrorType type, const char* message, void* userdata);
static void OnDeviceError(WGPUErrorType type, const char* message, void* userdata);
std::string mDeviceErrorMessage;
bool mExpectError = false;
bool mError = false;