-
I think I run into a chrome bug? I have a compute shader like this:
the shader reads the value at the index 1 from an array of type hence if the input but the actual output is [5,6,7]; it seems that dawn thinks it was the minimal reproducible code: https://raw.githubusercontent.com/shi-yan/WebGPUUnleashed/main/5_08_gaussian_splatting_5/bug.html |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think this is due to padding rules : https://www.w3.org/TR/WGSL/#alignment-and-size. |
Beta Was this translation helpful? Give feedback.
I think this is due to padding rules : https://www.w3.org/TR/WGSL/#alignment-and-size.
Alignment of vec3 floats is 16 bytes instead of 12 bytes. So the initialized array should obey the padding rules.