v152 · webgpu · wgsl
Offset and size validator
This demo uses the exact WGSL extension and built-in names from the proposal. Unsupported browsers show a clear fallback instead of pretending shader creation succeeded.
Check size and alignment before shader creation
code path
offset % RequiredAlignOf(T, AS) === 0
MinTypeSize(T) + offset <= bufferLength(p)