Generate specific error when BGL storageTextureFormat is missing
Some WebGPU CTS tests were failing with invalid WGPUTextureFormat when really the format was simply missing. This CL updates the validation code so it is more clear. Bug: dawn:433 Change-Id: Ie7aacd01ea424d9f5df0078703a474e98b72ce41 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22543 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
0768ffa742
commit
2f02207805
src/dawn_native
|
@ -68,6 +68,9 @@ namespace dawn_native {
|
|||
switch (bindingType) {
|
||||
case wgpu::BindingType::ReadonlyStorageTexture:
|
||||
case wgpu::BindingType::WriteonlyStorageTexture: {
|
||||
if (storageTextureFormat == wgpu::TextureFormat::Undefined) {
|
||||
return DAWN_VALIDATION_ERROR("Storage texture format is missing");
|
||||
}
|
||||
DAWN_TRY(ValidateTextureFormat(storageTextureFormat));
|
||||
|
||||
const Format* format = nullptr;
|
||||
|
|
Loading…
Reference in New Issue