Jeff Bolz | 9f2aec4 | 2019-01-06 17:58:04 -0600 | [diff] [blame] | 1 | #version 450
|
| 2 |
|
| 3 | #extension GL_EXT_buffer_reference : enable
|
| 4 |
|
| 5 | layout(buffer_reference, std430) buffer blockType {
|
| 6 | layout(offset = 0) int a;
|
| 7 | layout(offset = 4) int b;
|
| 8 | layout(offset = 8) int c;
|
| 9 | layout(offset = 12) int d;
|
| 10 | layout(offset = 16) int e;
|
| 11 | };
|
| 12 |
|
| 13 | layout(std430) buffer t2 {
|
| 14 | blockType f;
|
| 15 | blockType g;
|
| 16 | } t;
|
| 17 |
|
| 18 | layout(std430, buffer_reference) buffer T2 { int x; };
|
| 19 | layout(std430, buffer_reference) buffer T1 { int x; };
|
| 20 |
|
| 21 | struct Blah {
|
| 22 | T1 t1;
|
| 23 | T2 t2;
|
| 24 | };
|
| 25 |
|
| 26 | layout(set=0, binding=0) buffer T3 {
|
| 27 | Blah Bindings[];
|
| 28 | } t3;
|
| 29 |
|
| 30 | void main() {
|
| 31 | t3.Bindings[0] = t3.Bindings[1];
|
| 32 | }
|