2013-01-28 21:40:21 +04:00
|
|
|
#version 100
|
|
|
|
|
|
|
|
varying vec3 color;
|
|
|
|
|
|
|
|
lowp vec2 foo(mediump vec3 mv3)
|
|
|
|
{
|
|
|
|
highp vec4 hv4;
|
|
|
|
return hv4.xy;
|
|
|
|
}
|
|
|
|
|
|
|
|
int global_medium;
|
|
|
|
|
2013-05-17 06:51:45 +04:00
|
|
|
uniform lowp sampler2D samplerLow;
|
|
|
|
uniform mediump sampler2D samplerMed;
|
|
|
|
uniform highp sampler2D samplerHigh;
|
|
|
|
|
2013-04-05 08:05:39 +04:00
|
|
|
precision highp int;
|
|
|
|
precision highp ivec2; // ERROR
|
|
|
|
precision mediump int[2]; // ERROR
|
2013-04-25 20:44:03 +04:00
|
|
|
vec4 uint; // okay
|
2013-04-05 08:05:39 +04:00
|
|
|
precision mediump vec4; // ERROR
|
2013-01-28 21:40:21 +04:00
|
|
|
|
|
|
|
int global_high;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
lowp int sum = global_medium + global_high;
|
|
|
|
|
|
|
|
gl_FragColor = vec4(color, 1.0f);
|
|
|
|
|
|
|
|
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-08 00:04:12 +04: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 21:40:21 +04:00
|
|
|
|
|
|
|
{
|
|
|
|
int level2_low;
|
|
|
|
sum += level2_low;
|
|
|
|
|
|
|
|
precision highp int;
|
|
|
|
int level2_high;
|
|
|
|
sum += level2_high;
|
|
|
|
do {
|
2013-01-29 03:52:49 +04:00
|
|
|
if (true) {
|
2013-01-28 21:40:21 +04:00
|
|
|
precision mediump int;
|
|
|
|
int level4_medium;
|
|
|
|
sum += level4_medium;
|
|
|
|
}
|
|
|
|
int level3_high;
|
|
|
|
sum += level3_high;
|
2013-01-29 03:52:49 +04:00
|
|
|
} while (true);
|
2013-01-28 21:40:21 +04:00
|
|
|
int level2_high2;
|
|
|
|
sum += level2_high2;
|
|
|
|
}
|
|
|
|
int level1_low3;
|
|
|
|
sum += level1_low3;
|
2013-01-29 03:52:49 +04:00
|
|
|
|
|
|
|
sum += 4 + ((ivec2(level1_low3) * ivec2(level1_high) + ivec2((/* comma operator */level1_low3, level1_high)))).x;
|
2013-05-17 06:51:45 +04: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 21:40:21 +04:00
|
|
|
}
|