Block/structure fixes: Merge qualifiers with multiple declarators, handle arrays of blocks, more semantic checks for what's allowed.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21883 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-06-06 18:31:21 +00:00
parent ceb0623823
commit 0fbb0c4930
6 changed files with 81 additions and 30 deletions

38
Test/300block.frag Normal file
View File

@@ -0,0 +1,38 @@
#version 300 es
struct S {
vec4 u;
uvec4 v;
isampler3D sampler;
vec3 w;
struct T1 { // ERROR
int a;
} t;
};
uniform S s;
uniform fooBlock {
uvec4 bv;
mat2 bm2;
isampler2D sampler; // ERROR
struct T2 { // ERROR
int a;
} t;
S fbs;
};
uniform barBlock {
uvec4 nbv;
int ni;
} inst;
uniform barBlockArray {
uvec4 nbv;
int ni;
} insts[4];
void main()
{
texture(s.sampler, vec3(inst.ni, bv.y, insts[2].nbv.z));
}

View File

@@ -27,6 +27,7 @@ comment.frag
300layout.vert
300layout.frag
300operations.frag
300block.frag
330.frag
330comp.frag
constErrors.frag