blob: f0dc389803a37c9d99e36e32ae7459cc251d8e29 [file] [log] [blame]
John Kessenichf85e8062015-12-19 13:57:10 -07001#version 450
2
John Kesseniche0b6cad2015-12-24 10:30:13 -07003// should get 3 SPV types for S: no layout, 140, and 430, plus extras for interpolation or invariant differences
John Kessenichf85e8062015-12-19 13:57:10 -07004struct S
5{
6 highp uvec3 a;
7 mediump mat2 b[4];
8 lowp uint c;
9};
10
11layout(set = 0, binding = 0, std140) uniform Block140
12{
13 mediump int u;
14 S s[2][3];
15 mediump vec2 v;
16} inst140;
17
18layout(set = 0, binding = 1, std430) buffer Block430
19{
20 mediump int u;
21 S s[2][3];
22 mediump vec2 v;
23} inst430;
24
25S s;
26
John Kessenich3ac051e2015-12-20 11:29:16 -070027// should get 5 SPV types for T: no layout, 140/row, 140/col, 430/row, and 430/col
28struct T {
29 mat2 m;
30 int a;
31};
32
33T t;
34
35struct Nestor {
36 T nestorT;
37};
38
39layout(set = 1, binding = 0, std140) uniform Bt1
40{
41 layout(row_major) Nestor nt;
42} Btn1;
43
44layout(set = 1, binding = 0, std140) uniform Bt2
45{
46 layout(column_major) Nestor nt;
47} Btn2;
48
49layout(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
55layout(set = 1, binding = 0, std430) buffer bBt1
56{
57 layout(row_major) Nestor nt;
58} bBtn1;
59
60layout(set = 1, binding = 0, std430) buffer bBt2
61{
62 layout(column_major) Nestor nt;
63} bBtn2;
64
65layout(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 Kessenichf85e8062015-12-19 13:57:10 -070071void main()
72{
John Kessenichf85e8062015-12-19 13:57:10 -070073}
John Kesseniche0b6cad2015-12-24 10:30:13 -070074
75flat out S sout;
76invariant out S soutinv;