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

@@ -14,7 +14,7 @@
#include "common/Assert.h"
#include "dawn/dawn_proc.h"
#include "dawn/dawncpp.h"
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "dawn_wire/WireServer.h"
@@ -36,10 +36,10 @@ class DevNull : public dawn_wire::CommandSerializer {
std::vector<char> buf;
};
static DawnProcDeviceCreateSwapChain originalDeviceCreateSwapChain = nullptr;
static WGPUProcDeviceCreateSwapChain originalDeviceCreateSwapChain = nullptr;
DawnSwapChain ErrorDeviceCreateSwapChain(DawnDevice device, const DawnSwapChainDescriptor*) {
DawnSwapChainDescriptor desc;
WGPUSwapChain ErrorDeviceCreateSwapChain(WGPUDevice device, const WGPUSwapChainDescriptor*) {
WGPUSwapChainDescriptor desc;
desc.nextInChain = nullptr;
desc.label = nullptr;
// A 0 implementation will trigger a swapchain creation error.
@@ -65,10 +65,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
std::vector<dawn_native::Adapter> adapters = instance->GetAdapters();
dawn::Device nullDevice;
wgpu::Device nullDevice;
for (dawn_native::Adapter adapter : adapters) {
if (adapter.GetBackendType() == dawn_native::BackendType::Null) {
nullDevice = dawn::Device::Acquire(adapter.CreateDevice());
nullDevice = wgpu::Device::Acquire(adapter.CreateDevice());
break;
}
}