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:
38
Test/300block.frag
Normal file
38
Test/300block.frag
Normal 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));
|
||||
}
|
||||
@@ -27,6 +27,7 @@ comment.frag
|
||||
300layout.vert
|
||||
300layout.frag
|
||||
300operations.frag
|
||||
300block.frag
|
||||
330.frag
|
||||
330comp.frag
|
||||
constErrors.frag
|
||||
|
||||
Reference in New Issue
Block a user