[dawn][native] Remove redundant validation of textures in BG.
The validation on BGEntry containing textures was checking twice that a single
aspect is select in the view. Remove the check that's not in the
ValidateTextureBindGroupEntry helper function.
Bug:
Change-Id: Ic0cbd4965e568b1db30437802befc4fd8362c8bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/256475
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
diff --git a/src/dawn/native/BindGroup.cpp b/src/dawn/native/BindGroup.cpp
index d93b23a..f06128b 100644
--- a/src/dawn/native/BindGroup.cpp
+++ b/src/dawn/native/BindGroup.cpp
@@ -203,12 +203,9 @@
DAWN_TRY(ValidateTextureBindGroupEntry(device, entry));
TextureViewBase* view = entry.textureView;
-
- Aspect aspect = view->GetAspects();
- DAWN_INVALID_IF(!HasOneBit(aspect), "Multiple aspects (%s) selected in %s.", aspect, view);
-
TextureBase* texture = view->GetTexture();
+ Aspect aspect = view->GetAspects();
SampleTypeBit supportedTypes = texture->GetFormat().GetAspectInfo(aspect).supportedSampleTypes;
if (supportedTypes == SampleTypeBit::External) {
DAWN_ASSERT(texture->GetSharedResourceMemoryContents());