• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450 core
2
3#extension GL_EXT_shader_16bit_storage : enable
4
5struct S
6{
7    uint16_t  x;
8    u16vec2    y;
9    u16vec3    z;
10};
11
12layout(column_major, std140) uniform B1
13{
14    uint16_t  a;
15    u16vec2    b;
16    u16vec3    c;
17    uint16_t  d[2];
18    S          g;
19    S          h[2];
20    uint        j;
21} b1;
22
23layout(row_major, std430) buffer B2
24{
25    uint16_t  o;
26    u16vec2    p;
27    u16vec3    q;
28    uint16_t  r[2];
29    S          u;
30    S          v[2];
31    u16vec2    x[100];
32    uint16_t  w[];
33} b2;
34
35layout(row_major, std140) uniform B5
36{
37    uint16_t  o;
38    u16vec2    p;
39    u16vec3    q;
40    uint16_t  r[2];
41    S          u;
42    S          v[2];
43    u16vec2    x[100];
44    uint16_t  w[100];
45} b5;
46
47struct S2 {
48    mat4x4 x;
49    uint16_t y;
50    uint z;
51};
52
53struct S3 {
54    S2 x;
55};
56
57layout(row_major, std430) buffer B3
58{
59    S2 x;
60} b3;
61
62layout(column_major, std430) buffer B4
63{
64    S2 x;
65    S3 y;
66} b4;
67
68void main()
69{
70    b2.o = b1.a;
71    b2.p = u16vec2(uvec3(b2.q).xy);
72    b2.p = u16vec2(uvec3(b5.q).xy);
73    b2.r[0] = b2.r[0];
74    b2.r[1] = b5.r[1];
75    b2.p = b2.p;
76    uint x0 = uint(b1.a);
77    uvec4 x1 = uvec4(b1.a, b2.p, 1);
78    b4.x.x = b3.x.x;
79    b2.o = uint16_t(uvec2(b2.p).x);
80    b2.p = b2.v[1].y;
81    uvec3 v3 = uvec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
82    uvec3 u3 = uvec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
83    b2.x[0] = b2.x[0];
84    b2.x[1] = b5.x[1];
85    b2.p.x = b1.a;
86    b2.o = b2.p.x;
87    b2.p = u16vec2(uvec2(1, 2));
88    b2.o = uint16_t(3u);
89}
90
91