bgfx/3rdparty/glsl-optimizer/tests/fragment/ast-ir.txt

71 lines
1.2 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
void main ()
{
2012-10-07 23:41:18 -04:00
int i_1;
float a_2;
2012-04-03 23:30:07 -04:00
if ((gl_FragCoord.x == 1.0)) {
discard;
};
if ((2 == 3)) {
2012-10-07 23:41:18 -04:00
float tmpvar_3;
tmpvar_3 = 2.0;
a_2 = tmpvar_3;
2012-04-03 23:30:07 -04:00
};
if ((3 == 4)) {
2012-10-07 23:41:18 -04:00
float tmpvar_4;
tmpvar_4 = 3.0;
a_2 = tmpvar_4;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
float tmpvar_5;
tmpvar_5 = 4.0;
a_2 = tmpvar_5;
2012-04-03 23:30:07 -04:00
};
2012-10-07 23:41:18 -04:00
int tmpvar_6;
tmpvar_6 = 0;
i_1 = tmpvar_6;
2012-04-03 23:30:07 -04:00
while (true) {
2012-10-07 23:41:18 -04:00
if (!((i_1 < 10))) {
2012-04-03 23:30:07 -04:00
break;
};
2012-10-07 23:41:18 -04:00
float tmpvar_7;
tmpvar_7 = (a_2 + 1.0);
a_2 = tmpvar_7;
int tmpvar_8;
tmpvar_8 = (i_1 + 1);
i_1 = tmpvar_8;
2012-04-03 23:30:07 -04:00
};
while (true) {
2012-10-07 23:41:18 -04:00
float tmpvar_9;
tmpvar_9 = (a_2 + 2.0);
a_2 = tmpvar_9;
2012-04-03 23:30:07 -04:00
if (!((0 == 1))) {
break;
};
};
float tmpvar_10;
2012-10-07 23:41:18 -04:00
tmpvar_10 = (a_2 + 1.0);
a_2 = tmpvar_10;
2012-04-03 23:30:07 -04:00
float tmpvar_11;
2012-10-07 23:41:18 -04:00
tmpvar_11 = (a_2 * a_2);
a_2 = tmpvar_11;
2012-04-03 23:30:07 -04:00
float tmpvar_12;
2012-10-07 23:41:18 -04:00
tmpvar_12 = -(a_2);
a_2 = tmpvar_12;
2012-04-03 23:30:07 -04:00
float tmpvar_13;
2012-10-07 23:41:18 -04:00
tmpvar_13 = (a_2 - 1.0);
a_2 = tmpvar_13;
2012-04-03 23:30:07 -04:00
float tmpvar_14;
2012-10-07 23:41:18 -04:00
tmpvar_14 = sqrt (a_2);
float tmpvar_15;
tmpvar_15 = tmpvar_14;
a_2 = tmpvar_15;
float tmpvar_16;
tmpvar_16 = (1.0 / a_2);
a_2 = tmpvar_16;
vec4 tmpvar_17;
tmpvar_17 = vec4(a_2);
vec4 tmpvar_18;
tmpvar_18 = tmpvar_17;
gl_FragColor = tmpvar_18;
2012-04-03 23:30:07 -04:00
}