Reflection: Flesh out expansions of complex aggregates not fully dereferenced, visit all array elements for a variable index, and correct max array index when a later occurrence is larger than an earlier one.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24080 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-15 20:41:31 +00:00
parent c17dbd516f
commit 43e43ce77a
3 changed files with 200 additions and 87 deletions

View file

@ -19,7 +19,7 @@ scalarAfterm23: offset 48, type 1404, size 1, index 0
c_m23: offset 16, type 8b67, size 1, index 2
c_scalarAfterm23: offset 64, type 1404, size 1, index 2
scalarBeforeArray: offset 96, type 1404, size 1, index 0
floatArray: offset 112, type 1406, size 3, index 0
floatArray: offset 112, type 1406, size 5, index 0
scalarAfterArray: offset 192, type 1404, size 1, index 0
ablock.memvec2: offset 48, type 8b50, size 1, index 1
ablock.memf1: offset 56, type 1406, size 1, index 1
@ -33,6 +33,49 @@ nest.foo.n1.a: offset 0, type 1406, size 1, index 3
nest.foo.n2.b: offset 16, type 1406, size 1, index 3
nest.foo.n2.c: offset 20, type 1406, size 1, index 3
nest.foo.n2.d: offset 24, type 1406, size 1, index 3
deepA[0].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
deepA[1].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
deepB[1].d2.d1[0].va: offset -1, type 8b50, size 2, index -1
deepB[1].d2.d1[1].va: offset -1, type 8b50, size 2, index -1
deepB[1].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
deepB[1].d2.d1[3].va: offset -1, type 8b50, size 2, index -1
deepB[0].d2.d1[0].va: offset -1, type 8b50, size 2, index -1
deepB[0].d2.d1[1].va: offset -1, type 8b50, size 2, index -1
deepB[0].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
deepB[0].d2.d1[3].va: offset -1, type 8b50, size 2, index -1
deepC[1].iv4: offset -1, type 8b52, size 1, index -1
deepC[1].d2.i: offset -1, type 1404, size 1, index -1
deepC[1].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
deepC[1].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
deepC[1].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
deepC[1].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
deepC[1].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
deepC[1].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
deepC[1].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
deepC[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
deepC[1].v3: offset -1, type 8b54, size 1, index -1
deepD[0].iv4: offset -1, type 8b52, size 1, index -1
deepD[0].d2.i: offset -1, type 1404, size 1, index -1
deepD[0].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
deepD[0].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
deepD[0].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
deepD[0].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
deepD[0].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
deepD[0].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
deepD[0].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
deepD[0].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
deepD[0].v3: offset -1, type 8b54, size 1, index -1
deepD[1].iv4: offset -1, type 8b52, size 1, index -1
deepD[1].d2.i: offset -1, type 1404, size 1, index -1
deepD[1].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
deepD[1].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
deepD[1].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
deepD[1].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
deepD[1].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
deepD[1].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
deepD[1].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
deepD[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
deepD[1].v3: offset -1, type 8b54, size 1, index -1
anonMember1: offset 0, type 8b51, size 1, index 0
uf1: offset -1, type 1406, size 1, index -1
uf2: offset -1, type 1406, size 1, index -1
@ -40,7 +83,7 @@ ablock.member3: offset 32, type 8b52, size 1, index 1
Uniform block reflection:
nameless: offset -1, type ffffffff, size 496, index -1
ablock: offset -1, type ffffffff, size 304, index -1
named: offset -1, type ffffffff, size 304, index -1
c_nameless: offset -1, type ffffffff, size 112, index -1
nest: offset -1, type ffffffff, size 28, index -1
nested: offset -1, type ffffffff, size 28, index -1

View file

@ -78,6 +78,24 @@ uniform sampler2DMSArray sampler_2DMSArray;
uniform mat2 dm22[10];
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];
const bool control = true;
void deadFunction()
@ -120,6 +138,7 @@ void main()
f = c_m23[1].y + c_scalarAfterm23;
f += scalarBeforeArray;
f += floatArray[2];
f += floatArray[4];
f += scalarAfterArray;
f += ablock.memvec2.x;
f += ablock.memf1;
@ -130,6 +149,11 @@ void main()
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;
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;
} else
f = ufDead3;
}