xref: /aosp_15_r20/external/skia/resources/sksl/spirv/StructArrayMemberInDifferentLayouts.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// In this test the same struct type `S` is used in contexts with different layout constraints.
2struct S {
3    float[2] a;
4};
5
6layout(vulkan, push_constant) uniform testPushConstants {
7    float[2] pushConstantArray;
8};
9
10layout(set = 0, binding = 0) uniform testUniforms {
11    float[2] uboArray;
12};
13
14void main() {
15    S s1 = S(pushConstantArray);
16    S s2 = S(uboArray);
17
18    sk_FragColor = (s1 == s2) ? half4(1) : half4(0);
19}
20