dawn-cmake/test/tint/bug/tint/870.spvasm.expected.glsl
Ben Clayton d257e28792 tint: Don't override alignment with @offset
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>
2022-12-01 18:41:57 +00:00

40 lines
794 B
GLSL

#version 310 es
precision mediump float;
struct sspp962805860buildInformationS {
vec4 footprint;
vec4 offset;
int essence;
int orientation[6];
uint pad;
};
struct x_B4_BuildInformation {
sspp962805860buildInformationS passthru;
};
layout(binding = 2, std430) buffer sspp962805860buildInformation_block_ssbo {
x_B4_BuildInformation inner;
} sspp962805860buildInformation;
void main_1() {
int orientation[6] = int[6](0, 0, 0, 0, 0, 0);
int x_23[6] = sspp962805860buildInformation.inner.passthru.orientation;
orientation[0] = x_23[0u];
orientation[1] = x_23[1u];
orientation[2] = x_23[2u];
orientation[3] = x_23[3u];
orientation[4] = x_23[4u];
orientation[5] = x_23[5u];
return;
}
void tint_symbol() {
main_1();
}
void main() {
tint_symbol();
return;
}