John Kessenich | f85e806 | 2015-12-19 13:57:10 -0700 | [diff] [blame] | 1 | #version 450
|
| 2 |
|
John Kessenich | e0b6cad | 2015-12-24 10:30:13 -0700 | [diff] [blame] | 3 | // should get 3 SPV types for S: no layout, 140, and 430, plus extras for interpolation or invariant differences
|
John Kessenich | f85e806 | 2015-12-19 13:57:10 -0700 | [diff] [blame] | 4 | struct S
|
| 5 | {
|
| 6 | highp uvec3 a;
|
| 7 | mediump mat2 b[4];
|
| 8 | lowp uint c;
|
| 9 | };
|
| 10 |
|
| 11 | layout(set = 0, binding = 0, std140) uniform Block140
|
| 12 | {
|
| 13 | mediump int u;
|
| 14 | S s[2][3];
|
| 15 | mediump vec2 v;
|
| 16 | } inst140;
|
| 17 |
|
| 18 | layout(set = 0, binding = 1, std430) buffer Block430
|
| 19 | {
|
| 20 | mediump int u;
|
| 21 | S s[2][3];
|
| 22 | mediump vec2 v;
|
| 23 | } inst430;
|
| 24 |
|
| 25 | S s;
|
| 26 |
|
John Kessenich | 3ac051e | 2015-12-20 11:29:16 -0700 | [diff] [blame] | 27 | // should get 5 SPV types for T: no layout, 140/row, 140/col, 430/row, and 430/col
|
| 28 | struct T {
|
| 29 | mat2 m;
|
| 30 | int a;
|
| 31 | };
|
| 32 |
|
| 33 | T t;
|
| 34 |
|
| 35 | struct Nestor {
|
| 36 | T nestorT;
|
| 37 | };
|
| 38 |
|
| 39 | layout(set = 1, binding = 0, std140) uniform Bt1
|
| 40 | {
|
| 41 | layout(row_major) Nestor nt;
|
| 42 | } Btn1;
|
| 43 |
|
| 44 | layout(set = 1, binding = 0, std140) uniform Bt2
|
| 45 | {
|
| 46 | layout(column_major) Nestor nt;
|
| 47 | } Btn2;
|
| 48 |
|
| 49 | layout(row_major, set = 1, binding = 0, std140) uniform Bt3
|
| 50 | {
|
| 51 | layout(column_major) Nestor ntcol;
|
| 52 | Nestor ntrow; // should be row major decoration version of Nestor
|
| 53 | } Btn3;
|
| 54 |
|
| 55 | layout(set = 1, binding = 0, std430) buffer bBt1
|
| 56 | {
|
| 57 | layout(row_major) Nestor nt;
|
| 58 | } bBtn1;
|
| 59 |
|
| 60 | layout(set = 1, binding = 0, std430) buffer bBt2
|
| 61 | {
|
| 62 | layout(column_major) Nestor nt;
|
| 63 | } bBtn2;
|
| 64 |
|
| 65 | layout(set = 1, binding = 0, std430) buffer bBt3
|
| 66 | {
|
| 67 | layout(row_major) Nestor ntcol;
|
| 68 | Nestor ntrow; // should be col major decoration version of Nestor
|
| 69 | } bBtn3;
|
| 70 |
|
John Kessenich | f85e806 | 2015-12-19 13:57:10 -0700 | [diff] [blame] | 71 | void main()
|
| 72 | {
|
John Kessenich | f85e806 | 2015-12-19 13:57:10 -0700 | [diff] [blame] | 73 | }
|
John Kessenich | e0b6cad | 2015-12-24 10:30:13 -0700 | [diff] [blame] | 74 |
|
| 75 | flat out S sout;
|
| 76 | invariant out S soutinv;
|