tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 8c35f8db07ec463963b9daf823f0bdf5223205d9
parent f598dd7ca2af87da8919a7e970c38476317da203
Author: Erich Gubler <erichdongubler@gmail.com>
Date:   Wed, 29 Oct 2025 20:18:18 +0000

Bug 1996438 - test(webgpu): update CTS to eefe6f33964beec1bd1534b1d9065ad027b71740 r=webgpu-reviewers,nical

Differential Revision: https://phabricator.services.mozilla.com/D270269

Diffstat:
Mdom/webgpu/tests/cts/checkout/src/webgpu/api/operation/adapter/requestAdapter.spec.ts | 5++++-
Mdom/webgpu/tests/cts/checkout/src/webgpu/capability_info.ts | 1+
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/array/index.spec.ts | 41++++++++++++++++++++++++-----------------
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/expression.ts | 2++
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/memory_layout.spec.ts | 6+++++-
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/types.ts | 1+
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/align.spec.ts | 25+++++++++++++++----------
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/layout_constraints.spec.ts | 6+++++-
Mdom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/statement/continuing.spec.ts | 4++++
Mdom/webgpu/tests/cts/checkout/tools/gen_version | 2+-
Mdom/webgpu/tests/cts/moz.yaml | 4++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/adapter/requestAdapter/cts.https.html.ini | 14--------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini | 24++++++++----------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/access/array/index/cts.https.html.ini | 24++++++++++++++++++++++++
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini | 4++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini | 6+++++-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini | 15+++++++++++----
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureLoad/cts.https.html.ini | 24++++++++++++++++++++++--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini | 3+--
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini | 6+++++-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini | 2+-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini | 2+-
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini | 11++++++++---
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/call/builtin/subgroupShuffle/cts.https.html.ini | 8+++++---
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/requires/cts.https.html.ini | 2++
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/statement/continuing/cts.https.html.ini | 2++
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini | 9++++++---
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini | 1+
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini | 6++++++
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
Mtesting/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/image/cts.https.html.ini | 2+-
Mtesting/web-platform/mozilla/tests/webgpu/common/internal/version.js | 2+-
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js | 5++++-
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/capability_info.js | 5+++--
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/access/array/index.spec.js | 41++++++++++++++++++++++++-----------------
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/expression.js | 2++
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/memory_layout.spec.js | 6+++++-
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/types.js | 1+
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/align.spec.js | 25+++++++++++++++----------
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/layout_constraints.spec.js | 6+++++-
Mtesting/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/statement/continuing.spec.js | 4++++
41 files changed, 292 insertions(+), 134 deletions(-)

diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/adapter/requestAdapter.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/api/operation/adapter/requestAdapter.spec.ts @@ -124,7 +124,10 @@ g.test('requestAdapter') return; } - t.expect(adapter.info.isFallbackAdapter === Boolean(forceFallbackAdapter)); + // Only a fallback adapter may be returned when forceFallbackAdapter is true. + if (forceFallbackAdapter === true) { + t.expect(adapter.info.isFallbackAdapter === true); + } await testAdapter(t, adapter); }); diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/capability_info.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/capability_info.ts @@ -936,6 +936,7 @@ export const kKnownWGSLLanguageFeatures = [ 'packed_4x8_integer_dot_product', 'unrestricted_pointer_parameters', 'pointer_composite_access', + 'uniform_buffer_standard_layout', ] as const; export type WGSLLanguageFeature = (typeof kKnownWGSLLanguageFeatures)[number]; diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/array/index.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/access/array/index.spec.ts @@ -24,11 +24,7 @@ g.test('concrete_scalar') .desc(`Test indexing of an array of concrete scalars`) .params(u => u - .combine( - 'inputSource', - // 'uniform' address space requires array stride to be multiple of 16 bytes - allInputSources.filter(s => s !== 'uniform') - ) + .combine('inputSource', allInputSources) .combine('elementType', ['i32', 'u32', 'f32', 'f16'] as const) .combine('indexType', ['i32', 'u32'] as const) ) @@ -36,6 +32,10 @@ g.test('concrete_scalar') if (t.params.elementType === 'f16') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); } + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; const cases: Case[] = [ @@ -87,15 +87,14 @@ g.test('bool') .specURL('https://www.w3.org/TR/WGSL/#array-access-expr') .desc(`Test indexing of an array of booleans`) .params(u => - u - .combine( - 'inputSource', - // 'uniform' address space requires array stride to be multiple of 16 bytes - allInputSources.filter(s => s !== 'uniform') - ) - .combine('indexType', ['i32', 'u32'] as const) + u.combine('inputSource', allInputSources).combine('indexType', ['i32', 'u32'] as const) ) .fn(async t => { + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } + const indexType = Type[t.params.indexType]; const cases: Case[] = [ { @@ -290,16 +289,16 @@ g.test('vector') .params(u => u .combine('inputSource', allInputSources) - .expand('elementType', t => - t.inputSource === 'uniform' - ? (['vec4i', 'vec4u', 'vec4f'] as const) - : (['vec4i', 'vec4u', 'vec4f', 'vec4h'] as const) - ) + .expand('elementType', _ => ['vec4i', 'vec4u', 'vec4f', 'vec4h'] as const) .combine('indexType', ['i32', 'u32'] as const) ) .fn(async t => { if (t.params.elementType === 'vec4h') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; @@ -372,6 +371,14 @@ g.test('matrix') if (t.params.elementType === 'f16') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); } + if ( + t.params.inputSource === 'uniform' && + !t.hasLanguageFeature('uniform_buffer_standard_layout') + ) { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + const mat = Type.mat(t.params.columns, t.params.rows, Type[t.params.elementType]); + t.skipIf((align(mat.size, mat.alignment) & 15) !== 0); + } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; const matrixType = Type.mat(t.params.columns, t.params.rows, elementType); diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/expression.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/expression.ts @@ -102,6 +102,7 @@ function sizeAndAlignmentOf(ty: Type, source: InputSource): { size: number; alig if (ty instanceof ArrayType) { const out = sizeAndAlignmentOf(ty.elementType, source); + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (source === 'uniform') { out.alignment = align(out.alignment, 16); } @@ -155,6 +156,7 @@ export function structLayout( alignment = Math.max(alignment, sizeAndAlign.alignment); } + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (source === 'uniform') { alignment = align(alignment, 16); } diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/memory_layout.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/memory_layout.spec.ts @@ -934,8 +934,12 @@ g.test('read_layout') `Skipping atomic test for non-storage address space` ); + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + t.skipIf( - testcase.skip_uniform === true && t.params.aspace === 'uniform', + !ubo_std_layout && testcase.skip_uniform === true && t.params.aspace === 'uniform', `Uniform requires 16 byte alignment` ); }) diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/types.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/types.ts @@ -298,6 +298,7 @@ export function* generateTypes({ if (scalarInfo.layout) { // Compute the layout of the array type. // Adjust the array element count or element type as needed. + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (addressSpace === 'uniform') { // Use a vec4 of the scalar type, to achieve a 16 byte alignment without internal padding. // This works for 4-byte scalar types, and does not work for f16. diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/align.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/align.spec.ts @@ -202,6 +202,10 @@ g.test('required_alignment') .beginSubcases() ) .fn(t => { + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const has_ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + // While this would fail validation, it doesn't fail for any reasons related to alignment. // Atomics are not allowed in uniform address space as they have to be read_write. if (t.params.address_space === 'uniform' && t.params.type.name.startsWith('atomic')) { @@ -213,12 +217,12 @@ g.test('required_alignment') code += 'enable f16;\n'; } - // Testing the struct case, generate the structf + // Testing the struct case, generate the struct if (t.params.type.name === 'S') { code += `struct S { a: mat4x2<f32>, // Align 8 b: array<vec${ - t.params.address_space === 'storage' ? 2 : 4 + t.params.address_space === 'storage' || has_ubo_std_layout ? 2 : 4 }<i32>, 2>, // Storage align 8, uniform 16 } `; @@ -226,7 +230,7 @@ g.test('required_alignment') // Alignment value listed in the spec const min_align = - t.params.address_space === 'storage' + t.params.address_space === 'storage' || has_ubo_std_layout ? `${t.params.type.storage}` : `${t.params.type.uniform}`; const align = t.params.align === 'alignment' ? min_align : t.params.align; @@ -250,13 +254,14 @@ g.test('required_alignment') return vec4<f32>(.4, .2, .3, .1); }`; - // An array of `vec2` in uniform will not validate because, while the alignment on the array - // itself is fine, the `vec2` element inside the array will have the wrong alignment. Uniform - // requires that inner vec2 to have an align 16 which can only be done by specifying `vec4` - // instead. - const fails = - (t.params.address_space === 'uniform' && t.params.type.name.startsWith('array<vec2')) || - align < min_align; + let fails = align < min_align; + if (!has_ubo_std_layout) { + // An array of `vec2` in uniform will not validate because, while the alignment on the array + // itself is fine, the `vec2` element inside the array will have the wrong alignment. Uniform + // requires that inner vec2 to have an align 16 which can only be done by specifying `vec4` + // instead. + fails ||= t.params.address_space === 'uniform' && t.params.type.name.startsWith('array<vec2'); + } t.expectCompileResult(!fails, code); }); diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/layout_constraints.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/shader_io/layout_constraints.spec.ts @@ -525,11 +525,15 @@ ${decls} } code += `}\n`; + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + const is_interface = t.params.aspace === 'uniform' || t.params.aspace === 'storage'; const supports_atomic = t.params.aspace === 'storage' || t.params.aspace === 'workgroup'; const expect = testcase.validity === true || - (testcase.validity === 'non-uniform' && t.params.aspace !== 'uniform') || + (testcase.validity === 'non-uniform' && (t.params.aspace !== 'uniform' || ubo_std_layout)) || (testcase.validity === 'non-interface' && !is_interface) || (testcase.validity === 'storage' && t.params.aspace === 'storage') || (testcase.validity === 'atomic' && supports_atomic); diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/statement/continuing.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/statement/continuing.spec.ts @@ -163,6 +163,10 @@ const kTests = { src: 'loop { if a == 4 { break; } continuing { for(;a < 4;) { return vec4f(2); } } }', pass: false, }, + continuing_semicolon_break_if: { + src: 'loop { continuing { ; break if (true); } }', + pass: true, + }, }; g.test('placement') diff --git a/dom/webgpu/tests/cts/checkout/tools/gen_version b/dom/webgpu/tests/cts/checkout/tools/gen_version @@ -14,7 +14,7 @@ if (!fs.existsSync(myself)) { process.exit(1); } -const version = 'd8631014b7eae1f74a4084d40a5b5d6030b858f9'; +const version = 'eefe6f33964beec1bd1534b1d9065ad027b71740'; fs.mkdirSync('./gen/common/internal', { recursive: true }); // This will be copied into the various other build directories. diff --git a/dom/webgpu/tests/cts/moz.yaml b/dom/webgpu/tests/cts/moz.yaml @@ -8,8 +8,8 @@ origin: name: WebGPU CTS description: WebGPU Compliance Test Suite url: https://gpuweb.github.io/cts/ - release: d8631014b7eae1f74a4084d40a5b5d6030b858f9 (2025-10-17T15:52:40Z). - revision: d8631014b7eae1f74a4084d40a5b5d6030b858f9 + release: eefe6f33964beec1bd1534b1d9065ad027b71740 (2025-10-24T22:42:24Z). + revision: eefe6f33964beec1bd1534b1d9065ad027b71740 license: ['BSD-3-Clause'] updatebot: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/adapter/requestAdapter/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/operation/adapter/requestAdapter/cts.https.html.ini @@ -1,34 +1,20 @@ [cts.https.html?q=webgpu:api,operation,adapter,requestAdapter:requestAdapter:*] tags: [webgpu, webgpu-long] - implementation-status: - if os == "linux": backlog [:powerPreference="_undef_";forceFallbackAdapter="_undef_"] - expected: - if os == "linux": FAIL [:powerPreference="_undef_";forceFallbackAdapter=false] - expected: - if os == "linux": FAIL [:powerPreference="_undef_";forceFallbackAdapter=true] [:powerPreference="high-performance";forceFallbackAdapter="_undef_"] - expected: - if os == "linux": FAIL [:powerPreference="high-performance";forceFallbackAdapter=false] - expected: - if os == "linux": FAIL [:powerPreference="high-performance";forceFallbackAdapter=true] [:powerPreference="low-power";forceFallbackAdapter="_undef_"] - expected: - if os == "linux": FAIL [:powerPreference="low-power";forceFallbackAdapter=false] - expected: - if os == "linux": FAIL [:powerPreference="low-power";forceFallbackAdapter=true] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/state/device_lost/destroy/cts.https.html.ini @@ -8106,8 +8106,7 @@ [:format="r16float";usageType="storage";usageCopy="none";awaitLost=true] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] @@ -8137,22 +8136,19 @@ [:format="r16float";usageType="texture";usageCopy="dst";awaitLost=false] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="texture";usageCopy="dst";awaitLost=true] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="texture";usageCopy="none";awaitLost=false] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] @@ -8165,29 +8161,25 @@ [:format="r16float";usageType="texture";usageCopy="src";awaitLost=false] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="texture";usageCopy="src";awaitLost=true] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="texture";usageCopy="src-dest";awaitLost=false] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] [:format="r16float";usageType="texture";usageCopy="src-dest";awaitLost=true] expected: - if os == "win" and debug: FAIL - if os == "win" and not debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win": [FAIL, TIMEOUT, NOTRUN] if os == "linux": FAIL if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/access/array/index/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/access/array/index/cts.https.html.ini @@ -21,6 +21,10 @@ [:inputSource="storage_rw";indexType="u32"] + [:inputSource="uniform";indexType="i32"] + + [:inputSource="uniform";indexType="u32"] + [cts.https.html?q=webgpu:shader,execution,expression,access,array,index:concrete_scalar:*] [:inputSource="const";elementType="f16";indexType="i32"] @@ -71,6 +75,22 @@ [:inputSource="storage_rw";elementType="u32";indexType="u32"] + [:inputSource="uniform";elementType="f16";indexType="i32"] + + [:inputSource="uniform";elementType="f16";indexType="u32"] + + [:inputSource="uniform";elementType="f32";indexType="i32"] + + [:inputSource="uniform";elementType="f32";indexType="u32"] + + [:inputSource="uniform";elementType="i32";indexType="i32"] + + [:inputSource="uniform";elementType="i32";indexType="u32"] + + [:inputSource="uniform";elementType="u32";indexType="i32"] + + [:inputSource="uniform";elementType="u32";indexType="u32"] + [cts.https.html?q=webgpu:shader,execution,expression,access,array,index:matrix:*] implementation-status: @@ -184,6 +204,10 @@ [:inputSource="uniform";elementType="vec4f";indexType="u32"] + [:inputSource="uniform";elementType="vec4h";indexType="i32"] + + [:inputSource="uniform";elementType="vec4h";indexType="u32"] + [:inputSource="uniform";elementType="vec4i";indexType="i32"] [:inputSource="uniform";elementType="vec4i";indexType="u32"] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMinMax/cts.https.html.ini @@ -9175,13 +9175,13 @@ [:case=369;type="f32";op="subgroupMin";wgSize=[128,1,1\]] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:case=369;type="f32";op="subgroupMin";wgSize=[64,2,1\]] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/subgroupMul/cts.https.html.ini @@ -9813,7 +9813,11 @@ expected: [TIMEOUT, NOTRUN] [:case=751;type="f32";wgSize=[128,1,1\]] - expected: [TIMEOUT, NOTRUN] + expected: + if os == "win": [TIMEOUT, NOTRUN] + if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [TIMEOUT, NOTRUN] [:case=751;type="f32";wgSize=[64,2,1\]] expected: [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureGather/cts.https.html.ini @@ -33379,14 +33379,17 @@ [:stage="f";format="bc3-rgba-unorm";filt="nearest";mode="c"] expected: + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:stage="f";format="bc3-rgba-unorm";filt="nearest";mode="m"] expected: + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:stage="f";format="bc3-rgba-unorm";filt="nearest";mode="r"] expected: + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [PASS, TIMEOUT, NOTRUN] [:stage="f";format="bc3-rgba-unorm-srgb";filt="linear";mode="c"] @@ -42976,7 +42979,7 @@ if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:stage="c";format="depth24plus-stencil8";filt="nearest";modeU="m";modeV="m";offset=false] @@ -67761,7 +67764,8 @@ [:stage="c";format="bc2-rgba-unorm";filt="linear";mode="m"] expected: - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:stage="c";format="bc2-rgba-unorm";filt="linear";mode="r"] expected: @@ -67796,7 +67800,8 @@ [:stage="c";format="bc2-rgba-unorm-srgb";filt="nearest";mode="c"] expected: - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:stage="c";format="bc2-rgba-unorm-srgb";filt="nearest";mode="m"] expected: @@ -67805,7 +67810,8 @@ [:stage="c";format="bc2-rgba-unorm-srgb";filt="nearest";mode="r"] expected: - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:stage="c";format="bc3-rgba-unorm";filt="linear";mode="c"] expected: @@ -70228,6 +70234,7 @@ [:stage="f";format="bc5-rg-snorm";filt="nearest";mode="c"] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "linux": [TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureLoad/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureLoad/cts.https.html.ini @@ -402,6 +402,8 @@ [:stage="f";format="bgra8unorm";texture_type="texture_2d_array"] [:stage="f";format="bgra8unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="depth16unorm";texture_type="texture_2d_array"] expected: @@ -514,14 +516,24 @@ if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="f";format="r16float";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="r16sint";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="r16snorm";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="r16uint";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="r16unorm";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="r32float";texture_type="texture_2d_array"] expected: @@ -552,12 +564,20 @@ if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="rg16sint";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="rg16snorm";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="rg16uint";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="rg16unorm";texture_type="texture_2d_array"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="f";format="rg32float";texture_type="texture_2d_array"] expected: @@ -3059,7 +3079,7 @@ [:stage="v";format="rg16float"] expected: - if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="v";format="rg16sint"] expected: @@ -3135,7 +3155,7 @@ [:stage="v";format="rgba16unorm"] expected: - if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:stage="v";format="rgba32float"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSample/cts.https.html.ini @@ -5088,8 +5088,7 @@ [:format="bc3-rgba-unorm";filt="nearest";modeU="r";modeV="r";offset=false] expected: - if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "linux": [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:format="bc3-rgba-unorm";filt="nearest";modeU="r";modeV="r";offset=true] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompare/cts.https.html.ini @@ -1355,7 +1355,11 @@ expected: FAIL [:format="depth32float";filt="linear";modeU="m";modeV="c";offset=true] - expected: FAIL + expected: + if os == "win": FAIL + if os == "linux": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:format="depth32float";filt="linear";modeU="m";modeV="m";offset=false] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleCompareLevel/cts.https.html.ini @@ -6392,7 +6392,7 @@ [:stage="v";format="depth32float-stencil8";filt="linear";mode="m"] expected: - if os == "win" and debug: [TIMEOUT, NOTRUN] + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] if os == "win" and not debug: FAIL if os == "linux": FAIL if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleGrad/cts.https.html.ini @@ -3886,7 +3886,7 @@ [:stage="c";format="bc3-rgba-unorm-srgb";filt="linear";modeU="r";modeV="m";offset=false] expected: - if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "win": [PASS, TIMEOUT, NOTRUN] if os == "linux": [TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureSampleLevel/cts.https.html.ini @@ -592,7 +592,8 @@ [:stage="f";format="depth24plus";viewDimension="cube";mode="m"] expected: - if os == "win": FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL if os == "linux": FAIL if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: FAIL @@ -607,7 +608,8 @@ [:stage="f";format="depth24plus";viewDimension="cube-array";A="i32";mode="c"] expected: - if os == "win": FAIL + if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "win" and not debug: FAIL if os == "linux": FAIL if os == "mac" and debug: [TIMEOUT, NOTRUN] if os == "mac" and not debug: [PASS, FAIL] @@ -45809,11 +45811,13 @@ [:stage="v";format="rg16float";dim="3d";filt="linear"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:stage="v";format="rg16float";dim="3d";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -45825,6 +45829,7 @@ [:stage="v";format="rg16float";dim="cube";filt="nearest"] expected: + if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] @@ -66996,7 +67001,7 @@ if os == "win": FAIL if os == "linux": FAIL if os == "mac" and debug: [TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN] [:stage="c";format="depth24plus";filt="nearest";modeU="m";modeV="m";offset=true] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/call/builtin/subgroupShuffle/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/call/builtin/subgroupShuffle/cts.https.html.ini @@ -1327,21 +1327,23 @@ [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Cabstract-float%3E"] expected: - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [PASS, TIMEOUT, NOTRUN] [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Cabstract-int%3E"] expected: if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Cbool%3E"] + expected: + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Cf16%3E"] expected: - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [PASS, TIMEOUT, NOTRUN] [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Cf32%3E"] expected: - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [PASS, TIMEOUT, NOTRUN] [:retType="i32";op="subgroupShuffleDown";paramType="vec3%3Ci32%3E"] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/requires/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/parse/requires/cts.https.html.ini @@ -37,4 +37,6 @@ [:feature="readonly_and_readwrite_storage_textures"] + [:feature="uniform_buffer_standard_layout"] + [:feature="unrestricted_pointer_parameters"] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/statement/continuing/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/statement/continuing/cts.https.html.ini @@ -43,6 +43,8 @@ [:stmt="continuing_semicolon"] + [:stmt="continuing_semicolon_break_if"] + [:stmt="continuing_switch"] [:stmt="continuing_switch_break"] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/cts.https.html.ini @@ -1989,7 +1989,8 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="bgra8unorm-srgb";dstPremultiplied=true] expected: @@ -2016,13 +2017,15 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="r16unorm";dstPremultiplied=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="none";srcFlipYInCopy=true;dstFormat="r32float";dstPremultiplied=false] expected: diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/dedicated.https.html.ini @@ -4144,6 +4144,7 @@ [:orientation="none";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rgba8unorm-srgb";dstPremultiplied=false] expected: + if os == "linux" and debug: [PASS, TIMEOUT, NOTRUN] if os == "mac" and debug: [TIMEOUT, NOTRUN] [:orientation="none";colorSpaceConversion="none";srcFlipYInCopy=false;dstFormat="rgba8unorm-srgb";dstPremultiplied=true] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/ImageBitmap/shared.https.html.ini @@ -1566,12 +1566,14 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rg16unorm";dstPremultiplied=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rg32float";dstPremultiplied=false] @@ -1622,24 +1624,28 @@ expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rgba16float";dstPremultiplied=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rgba16unorm";dstPremultiplied=false] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rgba16unorm";dstPremultiplied=true] expected: if os == "win" and debug: [TIMEOUT, NOTRUN] if os == "linux" and debug: [TIMEOUT, NOTRUN] + if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] if os == "mac": [TIMEOUT, NOTRUN] [:alpha="premultiply";orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=true;dstFormat="rgba32float";dstPremultiplied=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/cts.https.html.ini @@ -1420,6 +1420,7 @@ [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: @@ -1429,10 +1430,12 @@ expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: @@ -1471,56 +1474,64 @@ if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg11b10ufloat";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "win": FAIL if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN] - if os == "mac": FAIL + if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN] + if os == "mac" and not debug: FAIL [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg16float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: @@ -1597,35 +1608,43 @@ [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl";dstColorFormat="rg8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] @@ -2094,8 +2113,7 @@ expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and not debug: [TIMEOUT, NOTRUN] + if os == "mac": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="r32float";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: @@ -2340,41 +2358,49 @@ expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rg8unorm";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux" and debug: [TIMEOUT, NOTRUN] if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgb10a2unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: @@ -2429,7 +2455,8 @@ [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba16float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba16float";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: @@ -2440,12 +2467,14 @@ [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba16float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba16float";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] - if os == "mac": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba16float";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: @@ -2565,35 +2594,42 @@ [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=false;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] - if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN] + if os == "mac": [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm-srgb";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: @@ -2618,10 +2654,12 @@ [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm-srgb";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm-srgb";srcPremultiplied=true;dstAlphaMode="opaque";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm-srgb";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=false] expected: @@ -2631,6 +2669,7 @@ [:canvasType="offscreen";contextName="webgl2";dstColorFormat="rgba8unorm-srgb";srcPremultiplied=true;dstAlphaMode="premultiplied";srcDoFlipYDuringCopy=true] expected: if os == "linux": [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:canvasType="onscreen";contextName="webgl";dstColorFormat="bgra8unorm";srcPremultiplied=false;dstAlphaMode="opaque";srcDoFlipYDuringCopy=false] diff --git a/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/image/cts.https.html.ini b/testing/web-platform/mozilla/meta/webgpu/cts/webgpu/web_platform/copyToTexture/image/cts.https.html.ini @@ -296,7 +296,7 @@ [:srcDoFlipYDuringCopy=true;dstColorFormat="rgba32float";dstPremultiplied=true] expected: if os == "win" and debug: [PASS, TIMEOUT, NOTRUN] - if os == "mac" and debug: [TIMEOUT, NOTRUN] + if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN] [:srcDoFlipYDuringCopy=true;dstColorFormat="rgba8unorm";dstPremultiplied=false] diff --git a/testing/web-platform/mozilla/tests/webgpu/common/internal/version.js b/testing/web-platform/mozilla/tests/webgpu/common/internal/version.js @@ -1,3 +1,3 @@ // AUTO-GENERATED - DO NOT EDIT. See tools/gen_version. -export const version = 'd8631014b7eae1f74a4084d40a5b5d6030b858f9'; +export const version = 'eefe6f33964beec1bd1534b1d9065ad027b71740'; diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js @@ -124,7 +124,10 @@ fn(async (t) => { return; } - t.expect(adapter.info.isFallbackAdapter === Boolean(forceFallbackAdapter)); + // Only a fallback adapter may be returned when forceFallbackAdapter is true. + if (forceFallbackAdapter === true) { + t.expect(adapter.info.isFallbackAdapter === true); + } await testAdapter(t, adapter); }); diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/capability_info.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/capability_info.js @@ -935,4 +935,5 @@ export const kKnownWGSLLanguageFeatures = [ 'readonly_and_readwrite_storage_textures', 'packed_4x8_integer_dot_product', 'unrestricted_pointer_parameters', -'pointer_composite_access']; -\ No newline at end of file +'pointer_composite_access', +'uniform_buffer_standard_layout']; +\ No newline at end of file diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/access/array/index.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/access/array/index.spec.js @@ -24,11 +24,7 @@ specURL('https://www.w3.org/TR/WGSL/#array-access-expr'). desc(`Test indexing of an array of concrete scalars`). params((u) => u. -combine( - 'inputSource', - // 'uniform' address space requires array stride to be multiple of 16 bytes - allInputSources.filter((s) => s !== 'uniform') -). +combine('inputSource', allInputSources). combine('elementType', ['i32', 'u32', 'f32', 'f16']). combine('indexType', ['i32', 'u32']) ). @@ -36,6 +32,10 @@ fn(async (t) => { if (t.params.elementType === 'f16') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); } + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; const cases = [ @@ -87,15 +87,14 @@ g.test('bool'). specURL('https://www.w3.org/TR/WGSL/#array-access-expr'). desc(`Test indexing of an array of booleans`). params((u) => -u. -combine( - 'inputSource', - // 'uniform' address space requires array stride to be multiple of 16 bytes - allInputSources.filter((s) => s !== 'uniform') -). -combine('indexType', ['i32', 'u32']) +u.combine('inputSource', allInputSources).combine('indexType', ['i32', 'u32']) ). fn(async (t) => { + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } + const indexType = Type[t.params.indexType]; const cases = [ { @@ -290,16 +289,16 @@ desc(`Test indexing of an array of vectors`). params((u) => u. combine('inputSource', allInputSources). -expand('elementType', (t) => -t.inputSource === 'uniform' ? -['vec4i', 'vec4u', 'vec4f'] : -['vec4i', 'vec4u', 'vec4f', 'vec4h'] -). +expand('elementType', (_) => ['vec4i', 'vec4u', 'vec4f', 'vec4h']). combine('indexType', ['i32', 'u32']) ). fn(async (t) => { if (t.params.elementType === 'vec4h') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); + if (t.params.inputSource === 'uniform') { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + t.skipIfLanguageFeatureNotSupported('uniform_buffer_standard_layout'); + } } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; @@ -372,6 +371,14 @@ fn(async (t) => { if (t.params.elementType === 'f16') { t.skipIfDeviceDoesNotHaveFeature('shader-f16'); } + if ( + t.params.inputSource === 'uniform' && + !t.hasLanguageFeature('uniform_buffer_standard_layout')) + { + // 'uniform' address space requires array stride to be multiple of 16 bytes without this language feature. + const mat = Type.mat(t.params.columns, t.params.rows, Type[t.params.elementType]); + t.skipIf((align(mat.size, mat.alignment) & 15) !== 0); + } const elementType = Type[t.params.elementType]; const indexType = Type[t.params.indexType]; const matrixType = Type.mat(t.params.columns, t.params.rows, elementType); diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/expression.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/expression/expression.js @@ -102,6 +102,7 @@ function sizeAndAlignmentOf(ty, source) { if (ty instanceof ArrayType) { const out = sizeAndAlignmentOf(ty.elementType, source); + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (source === 'uniform') { out.alignment = align(out.alignment, 16); } @@ -155,6 +156,7 @@ callback) alignment = Math.max(alignment, sizeAndAlign.alignment); } + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (source === 'uniform') { alignment = align(alignment, 16); } diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/memory_layout.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/execution/memory_layout.spec.js @@ -934,8 +934,12 @@ beforeAllSubcases((t) => { `Skipping atomic test for non-storage address space` ); + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + t.skipIf( - testcase.skip_uniform === true && t.params.aspace === 'uniform', + !ubo_std_layout && testcase.skip_uniform === true && t.params.aspace === 'uniform', `Uniform requires 16 byte alignment` ); }). diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/types.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/types.js @@ -298,6 +298,7 @@ export function* generateTypes({ if (scalarInfo.layout) { // Compute the layout of the array type. // Adjust the array element count or element type as needed. + // MAINTENANCE_TODO(#4485): Remove this when all implementors support uniform_buffer_standard_layout. if (addressSpace === 'uniform') { // Use a vec4 of the scalar type, to achieve a 16 byte alignment without internal padding. // This works for 4-byte scalar types, and does not work for f16. diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/align.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/align.spec.js @@ -202,6 +202,10 @@ combine('type', [ beginSubcases() ). fn((t) => { + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const has_ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + // While this would fail validation, it doesn't fail for any reasons related to alignment. // Atomics are not allowed in uniform address space as they have to be read_write. if (t.params.address_space === 'uniform' && t.params.type.name.startsWith('atomic')) { @@ -213,12 +217,12 @@ fn((t) => { code += 'enable f16;\n'; } - // Testing the struct case, generate the structf + // Testing the struct case, generate the struct if (t.params.type.name === 'S') { code += `struct S { a: mat4x2<f32>, // Align 8 b: array<vec${ - t.params.address_space === 'storage' ? 2 : 4 + t.params.address_space === 'storage' || has_ubo_std_layout ? 2 : 4 }<i32>, 2>, // Storage align 8, uniform 16 } `; @@ -226,7 +230,7 @@ fn((t) => { // Alignment value listed in the spec const min_align = - t.params.address_space === 'storage' ? + t.params.address_space === 'storage' || has_ubo_std_layout ? `${t.params.type.storage}` : `${t.params.type.uniform}`; const align = t.params.align === 'alignment' ? min_align : t.params.align; @@ -250,13 +254,14 @@ fn((t) => { return vec4<f32>(.4, .2, .3, .1); }`; - // An array of `vec2` in uniform will not validate because, while the alignment on the array - // itself is fine, the `vec2` element inside the array will have the wrong alignment. Uniform - // requires that inner vec2 to have an align 16 which can only be done by specifying `vec4` - // instead. - const fails = - t.params.address_space === 'uniform' && t.params.type.name.startsWith('array<vec2') || - align < min_align; + let fails = align < min_align; + if (!has_ubo_std_layout) { + // An array of `vec2` in uniform will not validate because, while the alignment on the array + // itself is fine, the `vec2` element inside the array will have the wrong alignment. Uniform + // requires that inner vec2 to have an align 16 which can only be done by specifying `vec4` + // instead. + fails ||= t.params.address_space === 'uniform' && t.params.type.name.startsWith('array<vec2'); + } t.expectCompileResult(!fails, code); }); diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/layout_constraints.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/shader_io/layout_constraints.spec.js @@ -525,11 +525,15 @@ ${decls} } code += `}\n`; + // If the `uniform_buffer_standard_layout` feature is supported, the `uniform` address space has + // the same layout constraints as `storage`. + const ubo_std_layout = t.hasLanguageFeature('uniform_buffer_standard_layout'); + const is_interface = t.params.aspace === 'uniform' || t.params.aspace === 'storage'; const supports_atomic = t.params.aspace === 'storage' || t.params.aspace === 'workgroup'; const expect = testcase.validity === true || - testcase.validity === 'non-uniform' && t.params.aspace !== 'uniform' || + testcase.validity === 'non-uniform' && (t.params.aspace !== 'uniform' || ubo_std_layout) || testcase.validity === 'non-interface' && !is_interface || testcase.validity === 'storage' && t.params.aspace === 'storage' || testcase.validity === 'atomic' && supports_atomic; diff --git a/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/statement/continuing.spec.js b/testing/web-platform/mozilla/tests/webgpu/webgpu/shader/validation/statement/continuing.spec.js @@ -162,6 +162,10 @@ const kTests = { return_for_nested_in_continue: { src: 'loop { if a == 4 { break; } continuing { for(;a < 4;) { return vec4f(2); } } }', pass: false + }, + continuing_semicolon_break_if: { + src: 'loop { continuing { ; break if (true); } }', + pass: true } };