-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Description
With WGSL currently the [[offset x]] decoration is required for SSBO and UBO structs. This makes it simpler for a WGSL compiler as we're told the offsets to use, but makes it harder for a user as you have to figure out the offsets to use.
There are, at least, four ways to specify the offsets in Vulkan. std140, std430, relaxed block layout and scalar block layout. In all cases they turn into SPIR-V with specific offsets provided.
The layout requirements depends on the of buffer in vulkan (modulo extensions which change it) so that uniforms at std140 and ssbos are std140 or std430 I believe.
Do we leave WGSL as is and require explicit offsets, or do we relax and allow a given layout to be specified?
kvark
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues