diff --git a/src/webgpu/listing_meta.json b/src/webgpu/listing_meta.json index e8d5950923c6..a45fa21e1ef8 100644 --- a/src/webgpu/listing_meta.json +++ b/src/webgpu/listing_meta.json @@ -1567,6 +1567,7 @@ "webgpu:shader,execution,expression,call,builtin,subgroupBitwise:compute,split:*": { "subcaseMS": 1743.045 }, "webgpu:shader,execution,expression,call,builtin,subgroupBitwise:data_types:*": { "subcaseMS": 5081.792 }, "webgpu:shader,execution,expression,call,builtin,subgroupBitwise:fragment,all_active:*": { "subcaseMS": 9079.446 }, + "webgpu:shader,execution,expression,call,builtin,subgroupBitwise:fragment,split:*": { "subcaseMS": 0.347 }, "webgpu:shader,execution,expression,call,builtin,subgroupBroadcast:data_types:*": { "subcaseMS": 252.374 }, "webgpu:shader,execution,expression,call,builtin,subgroupBroadcast:fragment:*": { "subcaseMS": 0.108 }, "webgpu:shader,execution,expression,call,builtin,subgroupBroadcast:workgroup_uniform_load:*": { "subcaseMS": 109.832 }, diff --git a/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts index 29a3ec47c860..691bc5e8a30e 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts @@ -447,6 +447,9 @@ predication filters are skipped. const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var inputs : u32; // unused diff --git a/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts index e6b6863a8e94..49489df0085c 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts @@ -466,6 +466,9 @@ predication filters are skipped. const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var inputs : u32; // unused diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts index a35981a31d5a..86510fe87738 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts @@ -311,6 +311,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var input : array; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupAll.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupAll.spec.ts index 0aa461c4a578..2b762053028e 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupAll.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupAll.spec.ts @@ -208,6 +208,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var inputs : array; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupAny.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupAny.spec.ts index 5d5b9de11420..5254ade1739a 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupAny.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupAny.spec.ts @@ -208,6 +208,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var inputs : array; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupBallot.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupBallot.spec.ts index 9b55405f88ba..4bd79dbdc15a 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupBallot.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupBallot.spec.ts @@ -188,6 +188,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var size : u32; @@ -224,6 +227,8 @@ g.test('predicate') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var size : u32; @@ -313,6 +318,9 @@ g.test('predicate_and_control_flow') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_branching); +diagnostic(off, subgroup_uniformity); + @group(0) @binding(0) var size : u32; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupBitwise.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupBitwise.spec.ts index c50fd08a1570..e95c486c3e59 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupBitwise.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupBitwise.spec.ts @@ -378,6 +378,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var inputs : array; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts index 75fe27e8cb5d..d62abb830328 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts @@ -242,6 +242,8 @@ g.test('workgroup_uniform_load') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_branching); + var wgmem : u32; @group(0) @binding(0) diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts index 28734afeb7d6..dfcaf481fcab 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts @@ -334,6 +334,9 @@ g.test('compute,split') const wgsl = ` enable subgroups; +diagnostic(off, subgroup_uniformity); +diagnostic(off, subgroup_branching); + @group(0) @binding(0) var input : array; diff --git a/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts b/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts index bd3db61f382b..bb7f3b113e26 100644 --- a/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts +++ b/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts @@ -1691,11 +1691,8 @@ fn fsMain( let countSubgroupSizeEqualI = ballotSubgroupSizeEqualI.x + ballotSubgroupSizeEqualI.y + ballotSubgroupSizeEqualI.z + ballotSubgroupSizeEqualI.w; subgroupSizeBallotedInvocations += countSubgroupSizeEqualI; // Validate that all active invocations see the same subgroup size, i.e. ballotedSubgroupSize - if (countSubgroupSizeEqualI == countActive) { - ballotedSubgroupSize = i; - } else if (countSubgroupSizeEqualI != 0) { - error++; - } + ballotedSubgroupSize = select(ballotedSubgroupSize, i, countSubgroupSizeEqualI == countActive); + error = select(error, error + 1, countSubgroupSizeEqualI != countActive && countSubgroupSizeEqualI != 0); } // Validate that all active invocations balloted in previous loop if (subgroupSizeBallotedInvocations != countActive) {