Reflection:

- correct block data size
 - handle deep dereference chains (block.member.member.member)
 - more clear interface argument names

(Still TBD: optimizing array size based on biggest used index and handling variable array index in middle of deep dereference chain)

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24072 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-11-15 01:34:27 +00:00
parent c0827e4532
commit 12f9221e44
6 changed files with 167 additions and 120 deletions

View File

@@ -9,6 +9,7 @@ layout(std140, row_major) uniform nameless {
int scalarBeforeArray;
float floatArray[5];
int scalarAfterArray;
mat2x2 m22[9];
};
layout(std140, column_major) uniform c_nameless {
@@ -29,6 +30,7 @@ layout(std140) uniform named {
bool memf2;
int memf3;
vec2 memvec2a;
mat2x2 m22[7];
} ablock;
layout(std140) uniform namelessdead {
@@ -39,6 +41,25 @@ layout(std140) uniform namedDead {
int b;
} bblock;
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;
struct TS {
int a;
int dead;
@@ -55,6 +76,8 @@ uniform uimage2D image_ui2D;
uniform sampler2D sampler_2D;
uniform sampler2DMSArray sampler_2DMSArray;
uniform mat2 dm22[10];
const bool control = true;
void deadFunction()
@@ -87,7 +110,7 @@ void main()
deadFunction();
float f;
int i;
if (control) {
liveFunction2();
f = anonMember3.z;
@@ -103,6 +126,10 @@ void main()
f += float(ablock.memf2);
f += ablock.memf3;
f += ablock.memvec2a.y;
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;
} else
f = ufDead3;
}