diff --git a/src/webgpu/api/operation/storage_texture/read_only.spec.ts b/src/webgpu/api/operation/storage_texture/read_only.spec.ts index b5224eec2b9d..767836f11a6d 100644 --- a/src/webgpu/api/operation/storage_texture/read_only.spec.ts +++ b/src/webgpu/api/operation/storage_texture/read_only.spec.ts @@ -580,7 +580,7 @@ g.test('basic') t.selectDeviceOrSkipTestCase('bgra8unorm-storage'); } if (t.isCompatibility) { - t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format); + t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format, t.device); } }) .fn(t => { diff --git a/src/webgpu/api/operation/storage_texture/read_write.spec.ts b/src/webgpu/api/operation/storage_texture/read_write.spec.ts index 03f613284238..4a7015a0dc35 100644 --- a/src/webgpu/api/operation/storage_texture/read_write.spec.ts +++ b/src/webgpu/api/operation/storage_texture/read_write.spec.ts @@ -316,7 +316,7 @@ g.test('basic') .unless(p => p.textureDimension === '1d' && p.depthOrArrayLayers > 1) ) .beforeAllSubcases(t => { - t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format); + t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format, t.device); }) .fn(t => { const { format, shaderStage, textureDimension, depthOrArrayLayers } = t.params; diff --git a/src/webgpu/api/validation/texture/bgra8unorm_storage.spec.ts b/src/webgpu/api/validation/texture/bgra8unorm_storage.spec.ts index 9a4834cdd124..9bdf35d516bb 100644 --- a/src/webgpu/api/validation/texture/bgra8unorm_storage.spec.ts +++ b/src/webgpu/api/validation/texture/bgra8unorm_storage.spec.ts @@ -34,6 +34,12 @@ class BGRA8UnormStorageValidationTests extends ValidationTest { }); }, !success); } + + skipIfTextureFormatNotUsableAsStorageTexture(format: GPUTextureFormat, device: GPUDevice): void { + if (format === 'bgra8unorm' && !device.features.has('bgra8unorm-storage')) { + this.skip('bgra8unorm-storage feature is not supported'); + } + } } export const g = makeTestGroup(BGRA8UnormStorageValidationTests);