2013-11-07 01:06:34 +00:00
|
|
|
#version 440 core
|
|
|
|
|
2013-11-13 05:40:44 +00:00
|
|
|
layout(std140, row_major) uniform nameless {
|
2013-11-07 01:06:34 +00:00
|
|
|
vec3 anonMember1;
|
2013-11-13 05:40:44 +00:00
|
|
|
mat3x2 m23;
|
|
|
|
int scalarAfterm23;
|
2013-11-07 01:06:34 +00:00
|
|
|
vec4 anonDeadMember2;
|
|
|
|
vec4 anonMember3;
|
2013-11-13 05:40:44 +00:00
|
|
|
int scalarBeforeArray;
|
|
|
|
float floatArray[5];
|
|
|
|
int scalarAfterArray;
|
2013-11-15 01:34:27 +00:00
|
|
|
mat2x2 m22[9];
|
2013-11-07 01:06:34 +00:00
|
|
|
};
|
|
|
|
|
2013-11-13 05:40:44 +00:00
|
|
|
layout(std140, column_major) uniform c_nameless {
|
|
|
|
vec3 c_anonMember1;
|
|
|
|
mat3x2 c_m23;
|
|
|
|
int c_scalarAfterm23;
|
|
|
|
vec4 c_anonDeadMember2;
|
|
|
|
vec4 c_anonMember3;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(std140) uniform named {
|
2013-11-07 01:06:34 +00:00
|
|
|
vec3 deadMember1;
|
2013-11-13 05:40:44 +00:00
|
|
|
int scalar;
|
2013-11-07 01:06:34 +00:00
|
|
|
vec4 member2;
|
|
|
|
vec4 member3;
|
2013-11-13 05:40:44 +00:00
|
|
|
vec2 memvec2;
|
|
|
|
float memf1;
|
|
|
|
bool memf2;
|
|
|
|
int memf3;
|
|
|
|
vec2 memvec2a;
|
2013-11-15 01:34:27 +00:00
|
|
|
mat2x2 m22[7];
|
2013-11-07 01:06:34 +00:00
|
|
|
} ablock;
|
|
|
|
|
2013-11-13 05:40:44 +00:00
|
|
|
layout(std140) uniform namelessdead {
|
2013-11-07 01:06:34 +00:00
|
|
|
int a;
|
|
|
|
};
|
|
|
|
|
2013-11-13 05:40:44 +00:00
|
|
|
layout(std140) uniform namedDead {
|
2013-11-07 01:06:34 +00:00
|
|
|
int b;
|
|
|
|
} bblock;
|
|
|
|
|
2013-11-15 01:34:27 +00:00
|
|
|
struct N1 {
|
|
|
|
float a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct N2 {
|
|
|
|
float b;
|
|
|
|
float c;
|
|
|
|
float d;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct N3 {
|
|
|
|
N1 n1;
|
|
|
|
N2 n2;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(std140) uniform nested {
|
|
|
|
N3 foo;
|
|
|
|
} nest;
|
|
|
|
|
2013-11-07 01:06:34 +00:00
|
|
|
struct TS {
|
|
|
|
int a;
|
|
|
|
int dead;
|
|
|
|
};
|
|
|
|
|
|
|
|
uniform TS s;
|
|
|
|
|
|
|
|
uniform float uf1;
|
|
|
|
uniform float uf2;
|
|
|
|
uniform float ufDead3;
|
|
|
|
uniform float ufDead4;
|
|
|
|
|
2014-08-10 18:19:36 +00:00
|
|
|
uniform writeonly uimage2D image_ui2D;
|
2013-11-13 19:07:43 +00:00
|
|
|
uniform sampler2D sampler_2D;
|
|
|
|
uniform sampler2DMSArray sampler_2DMSArray;
|
|
|
|
|
2013-11-15 01:34:27 +00:00
|
|
|
uniform mat2 dm22[10];
|
|
|
|
|
2013-11-15 20:41:31 +00:00
|
|
|
struct deep1 {
|
|
|
|
vec2 va[3];
|
|
|
|
bool b;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct deep2 {
|
|
|
|
int i;
|
|
|
|
deep1 d1[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct deep3 {
|
|
|
|
vec4 iv4;
|
|
|
|
deep2 d2;
|
|
|
|
ivec3 v3;
|
|
|
|
};
|
|
|
|
|
|
|
|
uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
|
|
|
|
|
2013-11-07 01:06:34 +00:00
|
|
|
const bool control = true;
|
|
|
|
|
|
|
|
void deadFunction()
|
|
|
|
{
|
|
|
|
vec3 v3 = ablock.deadMember1;
|
|
|
|
vec4 v = anonDeadMember2;
|
|
|
|
float f = ufDead4;
|
|
|
|
}
|
|
|
|
|
|
|
|
void liveFunction2()
|
|
|
|
{
|
|
|
|
vec3 v = anonMember1;
|
|
|
|
float f = uf1;
|
|
|
|
}
|
|
|
|
|
2014-08-10 18:19:36 +00:00
|
|
|
void liveFunction1(writeonly uimage2D p_ui2D, sampler2D p_2D, sampler2DMSArray p_2DMSArray)
|
2013-11-13 19:07:43 +00:00
|
|
|
|
2013-11-07 01:06:34 +00:00
|
|
|
{
|
|
|
|
liveFunction2();
|
|
|
|
float f = uf2;
|
|
|
|
vec4 v = ablock.member3;
|
|
|
|
}
|
|
|
|
|
2013-11-21 00:54:57 +00:00
|
|
|
uniform abl {
|
|
|
|
float foo;
|
|
|
|
} arrBl[4];
|
|
|
|
|
2013-11-23 00:44:18 +00:00
|
|
|
uniform abl2 {
|
|
|
|
float foo;
|
|
|
|
} arrBl2[4];
|
|
|
|
|
2013-11-07 01:06:34 +00:00
|
|
|
void main()
|
|
|
|
{
|
2013-11-13 19:07:43 +00:00
|
|
|
liveFunction1(image_ui2D, sampler_2D, sampler_2DMSArray);
|
2013-11-07 01:06:34 +00:00
|
|
|
liveFunction2();
|
|
|
|
|
|
|
|
if (! control)
|
|
|
|
deadFunction();
|
|
|
|
|
|
|
|
float f;
|
2013-11-15 01:34:27 +00:00
|
|
|
int i;
|
2013-11-07 01:06:34 +00:00
|
|
|
if (control) {
|
|
|
|
liveFunction2();
|
|
|
|
f = anonMember3.z;
|
|
|
|
f = s.a;
|
2013-11-13 05:40:44 +00:00
|
|
|
f = ablock.scalar;
|
|
|
|
f = m23[1].y + scalarAfterm23;
|
|
|
|
f = c_m23[1].y + c_scalarAfterm23;
|
|
|
|
f += scalarBeforeArray;
|
|
|
|
f += floatArray[2];
|
2013-11-15 20:41:31 +00:00
|
|
|
f += floatArray[4];
|
2013-11-13 05:40:44 +00:00
|
|
|
f += scalarAfterArray;
|
|
|
|
f += ablock.memvec2.x;
|
|
|
|
f += ablock.memf1;
|
|
|
|
f += float(ablock.memf2);
|
|
|
|
f += ablock.memf3;
|
|
|
|
f += ablock.memvec2a.y;
|
2013-11-15 01:34:27 +00:00
|
|
|
f += ablock.m22[i][1][0];
|
|
|
|
f += dm22[3][0][1];
|
|
|
|
f += m22[2][1].y;
|
|
|
|
f += nest.foo.n1.a + nest.foo.n2.b + nest.foo.n2.c + nest.foo.n2.d;
|
2013-11-15 20:41:31 +00:00
|
|
|
f += deepA[i].d2.d1[2].va[1].x;
|
|
|
|
f += deepB[1].d2.d1[i].va[1].x;
|
|
|
|
f += deepB[i].d2.d1[i].va[1].x;
|
|
|
|
deep3 d = deepC[1];
|
|
|
|
deep3 da[2] = deepD;
|
2013-11-07 01:06:34 +00:00
|
|
|
} else
|
|
|
|
f = ufDead3;
|
2013-11-21 00:54:57 +00:00
|
|
|
|
2013-11-23 00:44:18 +00:00
|
|
|
f += arrBl[2].foo + arrBl[0].foo;
|
|
|
|
f += arrBl2[i].foo;
|
2013-11-07 01:06:34 +00:00
|
|
|
}
|