diff --git a/src/webgpu/shader/validation/uniformity/uniformity.spec.ts b/src/webgpu/shader/validation/uniformity/uniformity.spec.ts index 1ae8cb3c4506..5d5bcbfc7132 100644 --- a/src/webgpu/shader/validation/uniformity/uniformity.spec.ts +++ b/src/webgpu/shader/validation/uniformity/uniformity.spec.ts @@ -44,6 +44,8 @@ const kConditions = [ { cond: 'nonuniform_and2', expectation: false }, { cond: 'uniform_func_var', expectation: true }, { cond: 'nonuniform_func_var', expectation: false }, + { cond: 'storage_texture_ro', expectation: true }, + { cond: 'storage_texture_rw', expectation: false }, ]; function generateCondition(condition: string): string { @@ -99,6 +101,12 @@ function generateCondition(condition: string): string { case 'nonuniform_func_var': { return `n_f == 0`; } + case 'storage_texture_ro': { + return `textureLoad(ro_storage_texture, vec2()).x == 0`; + } + case 'storage_texture_rw': { + return `textureLoad(rw_storage_texture, vec2()).x == 0`; + } default: { unreachable(`Unhandled condition`); } @@ -189,7 +197,7 @@ g.test('basics') .beginSubcases() ) .fn(t => { - if (t.params.op === 'textureBarrier') { + if (t.params.op === 'textureBarrier' || t.params.cond.startsWith('storage_texture')) { t.skipIfLanguageFeatureNotSupported('readonly_and_readwrite_storage_textures'); } @@ -203,6 +211,9 @@ g.test('basics') @group(1) @binding(1) var rw_buffer : array; @group(1) @binding(2) var uniform_buffer : vec4; + @group(2) @binding(0) var ro_storage_texture : texture_storage_2d; + @group(2) @binding(1) var rw_storage_texture : texture_storage_2d; + var priv_var : array = array(0,0,0,0); const c = false;