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

The starting values exactly fit: 48 + 16 = 64.

code path

offset % RequiredAlignOf(T, AS) === 0
MinTypeSize(T) + offset <= bufferLength(p)

see also