Remove Bit from TextureUsageBit and BufferUsageBit

This is to match the naming convention of WebGPU's WebIDL and webgpu.h

BUG=dawn:22

Change-Id: Ia91c5a018403e6a72eb0311b5f1a072d102282a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10461
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2019-08-27 08:21:39 +00:00
committed by Commit Bot service account
parent e25a3aede0
commit 9e9e29f7a6
110 changed files with 762 additions and 780 deletions

View File

@@ -81,7 +81,7 @@ namespace dawn_native {
}
void SwapChainBase::Configure(dawn::TextureFormat format,
dawn::TextureUsageBit allowedUsage,
dawn::TextureUsage allowedUsage,
uint32_t width,
uint32_t height) {
if (GetDevice()->ConsumedError(ValidateConfigure(format, allowedUsage, width, height))) {
@@ -89,14 +89,14 @@ namespace dawn_native {
}
ASSERT(!IsError());
allowedUsage |= dawn::TextureUsageBit::Present;
allowedUsage |= dawn::TextureUsage::Present;
mFormat = format;
mAllowedUsage = allowedUsage;
mWidth = width;
mHeight = height;
mImplementation.Configure(mImplementation.userData, static_cast<DawnTextureFormat>(format),
static_cast<DawnTextureUsageBit>(allowedUsage), width, height);
static_cast<DawnTextureUsage>(allowedUsage), width, height);
}
TextureBase* SwapChainBase::GetNextTexture() {
@@ -138,12 +138,12 @@ namespace dawn_native {
}
MaybeError SwapChainBase::ValidateConfigure(dawn::TextureFormat format,
dawn::TextureUsageBit allowedUsage,
dawn::TextureUsage allowedUsage,
uint32_t width,
uint32_t height) const {
DAWN_TRY(GetDevice()->ValidateObject(this));
DAWN_TRY(ValidateTextureUsageBit(allowedUsage));
DAWN_TRY(ValidateTextureUsage(allowedUsage));
DAWN_TRY(ValidateTextureFormat(format));
if (width == 0 || height == 0) {