webgpu / webgpufundamentals

https://webgpufundamentals.org
BSD 3-Clause "New" or "Revised" License
642 stars 93 forks source link

MemoryLayout: swap struct/array table header align & size #109

Closed sciecode closed 5 months ago

sciecode commented 5 months ago

Small fix on "WebGPU Data Memory-Layout" page.

On the section that explains how Struct and Array have unique rules for Alignment & Size, the table which is a reflection of WGSL spec, have the header names swapped.

I've believe only the ukranian translation also contains the same table, which have also been updated. Others don't appear to, but if I missed any, please let me know and I'll patch the PR.

sciecode commented 5 months ago

The table above that informs align and size for each WGSL type has size in second column and align in the third. If you rather keep things consistency, we can also swap the table content instead of the header. Lemme know which you prefer.