Use IsSubset in more places.

This helper function makes the code easier to read because the name
encodes the semantic of the operation compared to the bit-twiddling that
it replaces.

Bug: None
Change-Id: Iab587e04a91cf60acf8920de1f20bb55f3ea3816
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31668
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-11-06 17:11:50 +00:00
committed by Commit Bot service account
parent a701961ad3
commit 3317374395
14 changed files with 17 additions and 20 deletions

View File

@@ -318,7 +318,7 @@ namespace dawn_native {
// Check that the return texture view matches exactly what was given for this descriptor.
ASSERT(view->GetTexture()->GetFormat().format == mFormat);
ASSERT((view->GetTexture()->GetUsage() & mUsage) == mUsage);
ASSERT(IsSubset(mUsage, view->GetTexture()->GetUsage()));
ASSERT(view->GetLevelCount() == 1);
ASSERT(view->GetLayerCount() == 1);
ASSERT(view->GetDimension() == wgpu::TextureViewDimension::e2D);