Jeff Bolz | 9f2aec4 | 2019-01-06 17:58:04 -0600 | [diff] [blame] | 1 | #version 450
|
| 2 |
|
| 3 | #extension GL_EXT_buffer_reference : enable
|
| 4 | #extension GL_EXT_scalar_block_layout : enable
|
| 5 |
|
| 6 | layout(buffer_reference, scalar) buffer T1 {
|
| 7 | vec3 x[];
|
| 8 | };
|
| 9 |
|
| 10 | layout(buffer_reference, scalar) buffer T2 {
|
| 11 | vec3 x[][4][2];
|
| 12 | };
|
| 13 |
|
| 14 | struct S
|
| 15 | {
|
| 16 | highp ivec3 a;
|
| 17 | mediump mat3 b[4];
|
| 18 | highp vec4 c;
|
| 19 | };
|
| 20 |
|
| 21 | layout(buffer_reference, scalar) buffer T3 {
|
| 22 | S s;
|
| 23 | };
|
| 24 | layout(std430) buffer T4 {
|
| 25 | T1 t1;
|
| 26 | T2 t2;
|
| 27 | T3 t3;
|
| 28 | } t4;
|
| 29 |
|
| 30 | layout(location = 0) flat in int i;
|
| 31 |
|
| 32 | void main()
|
| 33 | {
|
| 34 | vec3 y;
|
| 35 | y = t4.t1.x[i];
|
| 36 | y = t4.t2.x[i][i][i];
|
| 37 | mat3 z = t4.t3.s.b[0];
|
| 38 | }
|