mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-05 01:37:07 +00:00
41a36bbb2f
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22066 e7fa87d3-cd2b-0410-9028-fcbf551c1848
130 lines
1.4 KiB
JavaScript
130 lines
1.4 KiB
JavaScript
#version 300 es
|
|
|
|
uniform block {
|
|
mediump float f;
|
|
} instanceName;
|
|
|
|
struct S {
|
|
int i;
|
|
} s;
|
|
|
|
float a[5];
|
|
|
|
void main()
|
|
{
|
|
bool b;
|
|
float f;
|
|
int i;
|
|
uint u;
|
|
bvec3 b3;
|
|
vec3 v3;
|
|
ivec3 iv3;
|
|
uvec3 uv3;
|
|
vec4 v4;
|
|
ivec4 iv4;
|
|
uvec4 uv4;
|
|
mat2 m2;
|
|
mat4 m4;
|
|
|
|
// These are all errors:
|
|
instanceName + instanceName;
|
|
s + s;
|
|
i + f;
|
|
u + f;
|
|
u + i;
|
|
iv3 *= iv4;
|
|
iv4 / uv4;
|
|
i - v3;
|
|
iv3 + uv3;
|
|
a * a;
|
|
b / b;
|
|
|
|
f % f;
|
|
i % f;
|
|
f % u;
|
|
instanceName++;
|
|
++s;
|
|
a--;
|
|
++b3;
|
|
|
|
iv3 < uv3;
|
|
m2 > m2;
|
|
m2 != m4;
|
|
i >= u;
|
|
a <= a;
|
|
b > b;
|
|
|
|
b && b3;
|
|
b3 ^^ b3;
|
|
b3 || b;
|
|
i && i;
|
|
u || u;
|
|
m2 ^^ m2;
|
|
|
|
!u;
|
|
!i;
|
|
!m2;
|
|
!v3;
|
|
!a;
|
|
|
|
~f;
|
|
~m4;
|
|
~v3;
|
|
~a;
|
|
~instanceName;
|
|
|
|
i << iv3;
|
|
u << uv3;
|
|
i >> f;
|
|
f >> i;
|
|
m4 >> i;
|
|
a >> u;
|
|
iv3 >> iv4;
|
|
|
|
i & u;
|
|
u ^ uv3;
|
|
i | uv3;
|
|
u & f;
|
|
m2 | m2;
|
|
s ^ s;
|
|
(f = f) = f;
|
|
|
|
// These are all okay:
|
|
f * v4;
|
|
u + u;
|
|
uv4 / u;
|
|
iv3 -= iv3;
|
|
|
|
i %= 3;
|
|
uv3 % 4u;
|
|
--m2;
|
|
iv4++;
|
|
|
|
m4 != m4;
|
|
m2 == m2;
|
|
i <= i;
|
|
a == a;
|
|
s != s;
|
|
|
|
b && b;
|
|
b || b;
|
|
b ^^ b;
|
|
|
|
!b, uv3;
|
|
|
|
~i;
|
|
~u;
|
|
~uv3;
|
|
~iv3;
|
|
|
|
uv3 <<= i;
|
|
i >> i;
|
|
u << u;
|
|
iv3 >> iv3;
|
|
|
|
i & i;
|
|
u | u;
|
|
iv3 ^ iv3;
|
|
|
|
}
|