Make dawn_native use the webgpu.h header

BUG=dawn:22

Change-Id: I66e2d998f5e09030e40ec88813cd65c492018fd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12541
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2019-10-23 11:57:41 +00:00
committed by Commit Bot service account
parent c833c0c592
commit 1f6c8c4d54
114 changed files with 1614 additions and 1617 deletions

View File

@@ -80,8 +80,8 @@ namespace dawn_native {
return new ErrorSwapChain(device);
}
void SwapChainBase::Configure(dawn::TextureFormat format,
dawn::TextureUsage allowedUsage,
void SwapChainBase::Configure(wgpu::TextureFormat format,
wgpu::TextureUsage allowedUsage,
uint32_t width,
uint32_t height) {
if (GetDevice()->ConsumedError(ValidateConfigure(format, allowedUsage, width, height))) {
@@ -89,7 +89,7 @@ namespace dawn_native {
}
ASSERT(!IsError());
allowedUsage |= dawn::TextureUsage::Present;
allowedUsage |= wgpu::TextureUsage::Present;
mFormat = format;
mAllowedUsage = allowedUsage;
@@ -106,7 +106,7 @@ namespace dawn_native {
ASSERT(!IsError());
TextureDescriptor descriptor;
descriptor.dimension = dawn::TextureDimension::e2D;
descriptor.dimension = wgpu::TextureDimension::e2D;
descriptor.size.width = mWidth;
descriptor.size.height = mHeight;
descriptor.size.depth = 1;
@@ -138,8 +138,8 @@ namespace dawn_native {
return mImplementation;
}
MaybeError SwapChainBase::ValidateConfigure(dawn::TextureFormat format,
dawn::TextureUsage allowedUsage,
MaybeError SwapChainBase::ValidateConfigure(wgpu::TextureFormat format,
wgpu::TextureUsage allowedUsage,
uint32_t width,
uint32_t height) const {
DAWN_TRY(GetDevice()->ValidateObject(this));