diff --git a/src/webgpu/shader/execution/shader_io/compute_builtins.spec.ts b/src/webgpu/shader/execution/shader_io/compute_builtins.spec.ts index 55e9d422999b..a08d6eb39533 100644 --- a/src/webgpu/shader/execution/shader_io/compute_builtins.spec.ts +++ b/src/webgpu/shader/execution/shader_io/compute_builtins.spec.ts @@ -398,9 +398,11 @@ g.test('subgroup_size') t.selectDeviceOrSkipTestCase('subgroups' as GPUFeatureName); }) .fn(async t => { - // Replace these with the limits when they are wired up. - const minSize = 4; - const maxSize = 128; + interface SubgroupLimits extends GPUSupportedLimits { + minSubgroupSize: number; + maxSubgroupSize: number; + } + const { minSubgroupSize, maxSubgroupSize } = t.device.limits as SubgroupLimits; const wgx = t.params.sizes[0]; const wgy = t.params.sizes[1]; @@ -512,7 +514,15 @@ fn main(@builtin(subgroup_size) size : u32, }); const compareData: Uint32Array = compareReadback.data; - t.expectOK(checkSubgroupSizeConsistency(sizesData, compareData, minSize, maxSize, wgThreads)); + t.expectOK( + checkSubgroupSizeConsistency( + sizesData, + compareData, + minSubgroupSize, + maxSubgroupSize, + wgThreads + ) + ); }); /**