Fix misplaced ASSERT in bind group validation

Fixed: dawn:614
Change-Id: I06e4c89f34a1705346620dea074e3d469cbd1409
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2021-06-24 23:05:51 +00:00
committed by Dawn LUCI CQ
parent 700a5fb869
commit a9faf7f74a
2 changed files with 34 additions and 3 deletions

View File

@@ -155,11 +155,10 @@ namespace dawn_native {
break;
}
case BindingInfoType::StorageTexture: {
ASSERT(!texture->IsMultisampledTexture());
if (!(texture->GetUsage() & wgpu::TextureUsage::Storage)) {
return DAWN_VALIDATION_ERROR("Storage Texture binding usage mismatch");
}
ASSERT(!texture->IsMultisampledTexture());
if (texture->GetFormat().format != bindingInfo.storageTexture.format) {
return DAWN_VALIDATION_ERROR("Storage texture format mismatch");