v152 · webgpu · compute
Workgroup validation
This demo uses real WebGPU feature detection and WGSL strings from the proposal. If WebGPU or subgroup-size-control is unavailable, it reports the fallback branch instead of pretending the feature ran.
Validate before creating a compute pipeline
code path
if (!adapter.features.has("subgroup-size-control")) return fallback;
const device = await adapter.requestDevice({ requiredFeatures: ["subgroup-size-control"] });
await device.createComputePipelineAsync({ compute: { module, entryPoint: "main" } });