mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-12 13:26:12 +00:00
83a6b1edfc
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23827 e7fa87d3-cd2b-0410-9028-fcbf551c1848
120 lines
2.7 KiB
GLSL
120 lines
2.7 KiB
GLSL
#version 120
|
|
|
|
in vec4 i; // ERROR
|
|
out vec4 o; // ERROR
|
|
|
|
attribute vec2 attv2;
|
|
attribute vec4 attv4;
|
|
uniform sampler2D s2D;
|
|
invariant varying vec2 centTexCoord;
|
|
invariant gl_Position;
|
|
centroid gl_Position; // ERROR
|
|
centroid centroid foo; // ERROR
|
|
invariant gl_Position, gl_PointSize;
|
|
|
|
void main()
|
|
{
|
|
centTexCoord = attv2;
|
|
gl_Position = attv4;
|
|
|
|
gl_ClipVertex = attv4;
|
|
gl_ClipDistance[1] = 0.2; // ERROR
|
|
|
|
vec3[12] a;
|
|
vec4[a.length()] b;
|
|
gl_Position = b[b.length()-1];
|
|
|
|
float f[];
|
|
int a1 = f.length(); // ERROR
|
|
float f[7];
|
|
int aa = f.length();
|
|
int a2 = f.length; // ERROR
|
|
int a3 = f.length(a); // ERROR
|
|
int a4 = f.flizbit; // ERROR
|
|
int a4 = f.flizbit(); // ERROR
|
|
float md[2][4]; // ERROR
|
|
float[2] md2[4]; // ERROR
|
|
float[2][4] md3; // ERROR
|
|
float md5, md6[2][3]; // ERROR
|
|
float[2] md4, md7[4]; // ERROR
|
|
float md9[2][3] = float[2][3](1, 2, 3, 4, 5, 6); // ERROR
|
|
float md10, md11[2][3] = float[2][3](1, 2, 3, 4, 5, 6); // ERROR
|
|
|
|
gl_PointSize = 3.8;
|
|
}
|
|
|
|
uniform float initted = 3.4; // okay
|
|
|
|
const float concall = sin(0.3);
|
|
|
|
int[2][3] foo( // ERROR
|
|
float[2][3] a, // ERROR
|
|
float[2] b[3], // ERROR
|
|
float c[2][3]); // ERROR
|
|
|
|
int overloadA(in float f);
|
|
int overloadA(out float f); // ERROR, different qualifiers
|
|
float overloadA(float); // ERROR, different return value for same signature
|
|
float overloadA(out float f, int);
|
|
float overloadA(int i);
|
|
|
|
vec2 overloadB(float, float);
|
|
|
|
vec2 overloadC(int, int);
|
|
vec2 overloadC(int, float);
|
|
vec2 overloadC(float, int);
|
|
vec2 overloadC(vec2, vec2);
|
|
|
|
vec3 overloadD(int, float);
|
|
vec3 overloadD(float, int);
|
|
|
|
vec3 overloadE(float[2]);
|
|
vec3 overloadE(mat2 m);
|
|
vec3 overloadE(vec2 v);
|
|
|
|
vec3 overloadF(int);
|
|
vec3 overloadF(float);
|
|
|
|
void foo()
|
|
{
|
|
float f;
|
|
int i;
|
|
|
|
overloadB(f, f);
|
|
overloadB(f, 2);
|
|
overloadB(1, i);
|
|
|
|
overloadC(1); // ERROR
|
|
overloadC(1, i);
|
|
overloadC(vec2(1), vec2(2));
|
|
overloadC(f, 3.0); // ERROR, no way
|
|
overloadC(ivec2(1), vec2(2));
|
|
|
|
overloadD(i, f);
|
|
overloadD(f, i);
|
|
overloadD(i, i); // ERROR, ambiguous
|
|
|
|
int overloadB; // hiding
|
|
overloadB(1, i); // ERROR
|
|
|
|
sin(1);
|
|
texture2D(s2D, ivec2(0));
|
|
clamp(attv4, 0, 1);
|
|
clamp(ivec4(attv4), 0, 1);
|
|
|
|
int a[2];
|
|
overloadC(a, 3); // ERROR
|
|
overloadE(a); // ERROR
|
|
overloadE(3.3); // ERROR
|
|
overloadE(vec2(3.3));
|
|
overloadE(mat2(0.5));
|
|
overloadE(ivec4(1)); // ERROR
|
|
overloadE(ivec2(1));
|
|
|
|
float b[2];
|
|
overloadE(b);
|
|
|
|
overloadF(1, 1); // ERROR
|
|
overloadF(1);
|
|
}
|