mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 00:47:13 +00:00
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:
committed by
Commit Bot service account
parent
e25a3aede0
commit
9e9e29f7a6
@@ -394,7 +394,7 @@ namespace dawn_native { namespace opengl {
|
||||
// We count the lazy clears for non output attachment textures and depth stencil
|
||||
// textures in order to match the backdoor lazy clear counts in Vulkan and D3D12.
|
||||
bool isLazyClear =
|
||||
((!(usages.textureUsages[i] & dawn::TextureUsageBit::OutputAttachment) &&
|
||||
((!(usages.textureUsages[i] & dawn::TextureUsage::OutputAttachment) &&
|
||||
texture->GetFormat().IsColor()) ||
|
||||
texture->GetFormat().HasDepthOrStencil());
|
||||
texture->EnsureSubresourceContentInitialized(
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace dawn_native { namespace opengl {
|
||||
}
|
||||
|
||||
DawnSwapChainError NativeSwapChainImpl::Configure(DawnTextureFormat format,
|
||||
DawnTextureUsageBit usage,
|
||||
DawnTextureUsage usage,
|
||||
uint32_t width,
|
||||
uint32_t height) {
|
||||
if (format != DAWN_TEXTURE_FORMAT_RGBA8_UNORM) {
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
void Init(DawnWSIContextGL* context);
|
||||
DawnSwapChainError Configure(DawnTextureFormat format,
|
||||
DawnTextureUsageBit,
|
||||
DawnTextureUsage,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
DawnSwapChainError GetNextTexture(DawnSwapChainNextTexture* nextTexture);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace dawn_native { namespace opengl {
|
||||
DawnSwapChainImplementation impl;
|
||||
impl = CreateSwapChainImplementation(
|
||||
new NativeSwapChainImpl(backendDevice, present, presentUserdata));
|
||||
impl.textureUsage = DAWN_TEXTURE_USAGE_BIT_PRESENT;
|
||||
impl.textureUsage = DAWN_TEXTURE_USAGE_PRESENT;
|
||||
|
||||
return impl;
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ namespace dawn_native { namespace opengl {
|
||||
return handle;
|
||||
}
|
||||
|
||||
bool UsageNeedsTextureView(dawn::TextureUsageBit usage) {
|
||||
constexpr dawn::TextureUsageBit kUsageNeedingTextureView =
|
||||
dawn::TextureUsageBit::Storage | dawn::TextureUsageBit::Sampled;
|
||||
bool UsageNeedsTextureView(dawn::TextureUsage usage) {
|
||||
constexpr dawn::TextureUsage kUsageNeedingTextureView =
|
||||
dawn::TextureUsage::Storage | dawn::TextureUsage::Sampled;
|
||||
return usage & kUsageNeedingTextureView;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user