• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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