Newer
Older
John Kessenich
committed
#version 300 es
John Kessenich
committed
precision mediump float;
John Kessenich
committed
struct S {
vec4 u;
uvec4 v;
John Kessenich
committed
lowp isampler3D sampler;
John Kessenich
committed
vec3 w;
struct T1 { // ERROR
int a;
} t;
};
uniform S s;
uniform fooBlock {
uvec4 bv;
John Kessenich
committed
uniform mat2 bm2;
John Kessenich
committed
lowp isampler2D sampler; // ERROR
John Kessenich
committed
struct T2 { // ERROR
John Kessenich
committed
int a;
} t;
John Kessenich
committed
S fbs; // ERROR, contains a sampler
John Kessenich
committed
};
uniform barBlock {
uvec4 nbv;
int ni;
} inst;
uniform barBlockArray {
uvec4 nbv;
int ni;
} insts[4];
John Kessenich
committed
uniform unreferenced {
float f;
uint u;
};
John Kessenich
committed
void main()
{
texture(s.sampler, vec3(inst.ni, bv.y, insts[2].nbv.z));
John Kessenich
committed
insts[s.v.x]; // ERROR
fooBlock; // ERROR
mat4(s); // ERROR
int insts;
float barBlock;
mat4(barBlock);
mat4(unreferenced); // ERROR, bad type
++s; // ERROR
inst - 1; // ERROR
++barBlock;
2 * barBlockArray; // ERROR
John Kessenich
committed
}
int fooBlock; // ERROR, redef.