mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 03:05:42 +00:00
Overriding the alignment to 1 would cause nested structures to be incorrectly laid out. The fix: Don't override the alignment. All struct layout validation works on the sem offsets, so none of this has to change. Bug: tint:1776 Change-Id: Ic01d45fb2790cd823ed9a55e336860ebdc351aea Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112603 Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
12 lines
177 B
WebGPU Shading Language
12 lines
177 B
WebGPU Shading Language
struct S { /* size: 32 align: 16 */
|
|
a : vec4<f32>,
|
|
b : i32,
|
|
}
|
|
|
|
@group(0) @binding(0) var<storage> sb : array<S>;
|
|
|
|
@compute @workgroup_size(1)
|
|
fn main() {
|
|
let x = sb[1];
|
|
}
|