2013-01-28 17:40:21 +00:00
|
|
|
#version 100
|
|
|
|
|
2013-06-19 05:41:25 +00:00
|
|
|
varying vec3 color; // ERRROR, there is no default qualifier for float
|
2013-01-28 17:40:21 +00:00
|
|
|
|
|
|
|
lowp vec2 foo(mediump vec3 mv3)
|
|
|
|
{
|
|
|
|
highp vec4 hv4;
|
|
|
|
return hv4.xy;
|
|
|
|
}
|
|
|
|
|
|
|
|
int global_medium;
|
|
|
|
|
2013-05-17 02:51:45 +00:00
|
|
|
uniform lowp sampler2D samplerLow;
|
|
|
|
uniform mediump sampler2D samplerMed;
|
|
|
|
uniform highp sampler2D samplerHigh;
|
|
|
|
|
2013-04-05 04:05:39 +00:00
|
|
|
precision highp int;
|
|
|
|
precision highp ivec2; // ERROR
|
|
|
|
precision mediump int[2]; // ERROR
|
2013-04-25 16:44:03 +00:00
|
|
|
vec4 uint; // okay
|
2013-04-05 04:05:39 +00:00
|
|
|
precision mediump vec4; // ERROR
|
2013-01-28 17:40:21 +00:00
|
|
|
|
|
|
|
int global_high;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
lowp int sum = global_medium + global_high;
|
|
|
|
|
2013-11-12 03:31:24 +00:00
|
|
|
gl_FragColor = vec4(color, 1.0);
|
2013-01-28 17:40:21 +00:00
|
|
|
|
|
|
|
int level1_high;
|
|
|
|
sum += level1_high;
|
|
|
|
|
|
|
|
precision lowp int;
|
|
|
|
int level1_low;
|
|
|
|
sum += level1_low;
|
Add ES 300 built-ins trunc, round, roundEven, modf, isnan, isinf, floatBitsToInt, floatBitsToUint, intBitsToFloat, uintBitsToFloat, packSnorm2x16, unpackSnorm2x16, packUnorm2x16, unpackUnorm2x16, packHalf2x16, and unpackHalf2x16, and new form of min, max, clamp, and mix.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21063 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-07 20:04:12 +00:00
|
|
|
|
|
|
|
// test maxing precisions of args to get precision of builtin
|
|
|
|
lowp float arg1;
|
|
|
|
mediump float arg2;
|
|
|
|
lowp float d = distance(arg1, arg2);
|
2013-01-28 17:40:21 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
int level2_low;
|
|
|
|
sum += level2_low;
|
|
|
|
|
|
|
|
precision highp int;
|
|
|
|
int level2_high;
|
|
|
|
sum += level2_high;
|
|
|
|
do {
|
2013-01-28 23:52:49 +00:00
|
|
|
if (true) {
|
2013-01-28 17:40:21 +00:00
|
|
|
precision mediump int;
|
|
|
|
int level4_medium;
|
|
|
|
sum += level4_medium;
|
|
|
|
}
|
|
|
|
int level3_high;
|
|
|
|
sum += level3_high;
|
2013-01-28 23:52:49 +00:00
|
|
|
} while (true);
|
2013-01-28 17:40:21 +00:00
|
|
|
int level2_high2;
|
|
|
|
sum += level2_high2;
|
|
|
|
}
|
|
|
|
int level1_low3;
|
|
|
|
sum += level1_low3;
|
2013-01-28 23:52:49 +00:00
|
|
|
|
|
|
|
sum += 4 + ((ivec2(level1_low3) * ivec2(level1_high) + ivec2((/* comma operator */level1_low3, level1_high)))).x;
|
2013-05-17 02:51:45 +00:00
|
|
|
|
|
|
|
texture2D(samplerLow, vec2(0.1, 0.2));
|
|
|
|
texture2D(samplerMed, vec2(0.1, 0.2));
|
|
|
|
texture2D(samplerHigh, vec2(0.1, 0.2));
|
2013-01-28 17:40:21 +00:00
|
|
|
}
|
2013-06-25 21:53:59 +00:00
|
|
|
|
|
|
|
precision mediump bool; // ERROR
|
|
|
|
//precision mediump struct { int a; } s; // ERROR
|
|
|
|
struct s {int a;};
|
|
|
|
precision mediump s; // ERROR
|
|
|
|
mediump bvec2 b2; // ERROR
|