mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-09 14:45:58 +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>
29 lines
359 B
GLSL
29 lines
359 B
GLSL
#version 310 es
|
|
|
|
struct S {
|
|
vec4 a;
|
|
int b;
|
|
uint pad;
|
|
uint pad_1;
|
|
uint pad_2;
|
|
};
|
|
|
|
layout(binding = 0, std430) buffer sb_block_ssbo {
|
|
S inner[];
|
|
} sb;
|
|
|
|
void main_1() {
|
|
S x_18 = sb.inner[1];
|
|
return;
|
|
}
|
|
|
|
void tint_symbol() {
|
|
main_1();
|
|
}
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void main() {
|
|
tint_symbol();
|
|
return;
|
|
}
|