From c318703808b307839325b9a0089b96809553626f Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Fri, 16 Jan 2026 16:26:55 -0800 Subject: [PATCH 1/2] Skip unsupported texture formats --- .../readonly_and_readwrite_storage_textures.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts b/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts index 3614381ca9aa..547b30d1b8c0 100644 --- a/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts +++ b/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts @@ -3,7 +3,10 @@ Validation tests for the readonly_and_readwrite_storage_textures language featur `; import { makeTestGroup } from '../../../../common/framework/test_group.js'; -import { kPossibleStorageTextureFormats } from '../../../format_info.js'; +import { + getRequiredFeatureForTextureFormat, + kPossibleStorageTextureFormats, +} from '../../../format_info.js'; import { ShaderValidationTest } from '../shader_validation_test.js'; export const g = makeTestGroup(ShaderValidationTest); @@ -28,6 +31,11 @@ g.test('var_decl') .fn(t => { const { type, format, access } = t.params; + const requiredFeature = getRequiredFeatureForTextureFormat(format); + if (requiredFeature) { + t.skipIfDeviceDoesNotHaveFeature(requiredFeature); + } + const source = `@group(0) @binding(0) var t : ${type}<${format}, ${access}>;`; const requiresFeature = access !== 'write'; t.expectCompileResult(t.hasLanguageFeature(kFeatureName) || !requiresFeature, source); From f65299bc0335f8d2d442ada602e47a3cf4b04002 Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Thu, 22 Jan 2026 10:31:47 -0800 Subject: [PATCH 2/2] Update src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts Co-authored-by: Kai Ninomiya --- .../readonly_and_readwrite_storage_textures.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts b/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts index 547b30d1b8c0..a25626cc56ad 100644 --- a/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts +++ b/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts @@ -15,7 +15,11 @@ const kFeatureName = 'readonly_and_readwrite_storage_textures'; g.test('var_decl') .desc( - `Checks that the read and read_write access modes are only allowed with the language feature present` + `Checks that the read and read_write access modes are only allowed with the language feature present + + TODO(https://github.com/gpuweb/gpuweb/issues/5524): Fix this to check wgslLanguageFeatures + of the device features. + ` ) .paramsSubcasesOnly(u => u