bgfx/3rdparty/glsl-optimizer/tests/fragment/ternary-vec4-irES.txt

160 lines
3.5 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
varying highp vec4 xlv_TEXCOORD0;
2014-03-29 19:26:01 -04:00
mediump vec2 xll_vecTSel (
2012-10-07 23:41:18 -04:00
in bvec2 a_1,
2014-03-29 19:26:01 -04:00
in mediump vec2 b_2,
in mediump vec2 c_3
2012-04-03 23:30:07 -04:00
)
{
2014-03-29 19:26:01 -04:00
mediump float tmpvar_4;
2012-10-07 23:41:18 -04:00
if (a_1.x) {
tmpvar_4 = b_2.x;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_4 = c_3.x;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_5;
2012-10-07 23:41:18 -04:00
if (a_1.y) {
tmpvar_5 = b_2.y;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_5 = c_3.y;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump vec2 tmpvar_6;
2012-10-07 23:41:18 -04:00
tmpvar_6.x = tmpvar_4;
tmpvar_6.y = tmpvar_5;
return tmpvar_6;
2012-04-03 23:30:07 -04:00
}
2014-03-29 19:26:01 -04:00
mediump vec3 xll_vecTSel (
2012-10-07 23:41:18 -04:00
in bvec3 a_7,
2014-03-29 19:26:01 -04:00
in mediump vec3 b_8,
in mediump vec3 c_9
2012-04-03 23:30:07 -04:00
)
{
2014-03-29 19:26:01 -04:00
mediump float tmpvar_10;
2012-10-07 23:41:18 -04:00
if (a_7.x) {
tmpvar_10 = b_8.x;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_10 = c_9.x;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_11;
2012-10-07 23:41:18 -04:00
if (a_7.y) {
tmpvar_11 = b_8.y;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_11 = c_9.y;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_12;
2012-10-07 23:41:18 -04:00
if (a_7.z) {
tmpvar_12 = b_8.z;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_12 = c_9.z;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump vec3 tmpvar_13;
2012-10-07 23:41:18 -04:00
tmpvar_13.x = tmpvar_10;
tmpvar_13.y = tmpvar_11;
tmpvar_13.z = tmpvar_12;
return tmpvar_13;
2012-04-03 23:30:07 -04:00
}
2014-03-29 19:26:01 -04:00
mediump vec4 xll_vecTSel (
2012-10-07 23:41:18 -04:00
in bvec4 a_14,
2014-03-29 19:26:01 -04:00
in mediump vec4 b_15,
in mediump vec4 c_16
2012-04-03 23:30:07 -04:00
)
{
2014-03-29 19:26:01 -04:00
mediump float tmpvar_17;
2012-10-07 23:41:18 -04:00
if (a_14.x) {
tmpvar_17 = b_15.x;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_17 = c_16.x;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_18;
2012-10-07 23:41:18 -04:00
if (a_14.y) {
tmpvar_18 = b_15.y;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_18 = c_16.y;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_19;
2012-10-07 23:41:18 -04:00
if (a_14.z) {
tmpvar_19 = b_15.z;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_19 = c_16.z;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump float tmpvar_20;
2012-10-07 23:41:18 -04:00
if (a_14.w) {
tmpvar_20 = b_15.w;
2012-04-03 23:30:07 -04:00
} else {
2012-10-07 23:41:18 -04:00
tmpvar_20 = c_16.w;
2012-04-03 23:30:07 -04:00
};
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_21;
2012-10-07 23:41:18 -04:00
tmpvar_21.x = tmpvar_17;
tmpvar_21.y = tmpvar_18;
tmpvar_21.z = tmpvar_19;
tmpvar_21.w = tmpvar_20;
return tmpvar_21;
2012-04-03 23:30:07 -04:00
}
mediump vec4 xlat_main (
2012-10-07 23:41:18 -04:00
in highp vec4 uv_22
2012-04-03 23:30:07 -04:00
)
{
2012-10-07 23:41:18 -04:00
highp vec4 a_23;
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_24;
2012-10-07 23:41:18 -04:00
tmpvar_24 = vec4(0.0, 0.0, 0.0, 0.0);
a_23 = tmpvar_24;
bvec4 tmpvar_25;
tmpvar_25 = greaterThan (uv_22, vec4(0.5, 0.5, 0.5, 0.5));
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_26;
2012-10-07 23:41:18 -04:00
tmpvar_26 = xll_vecTSel (tmpvar_25, vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 6.0, 7.0, 8.0));
highp vec4 tmpvar_27;
tmpvar_27 = (a_23 + tmpvar_26);
a_23 = tmpvar_27;
bvec4 tmpvar_28;
tmpvar_28 = greaterThan (uv_22, vec4(0.5, 0.5, 0.5, 0.5));
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_29;
2012-10-07 23:41:18 -04:00
tmpvar_29 = xll_vecTSel (tmpvar_28, vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 6.0, 7.0, 8.0));
highp vec4 tmpvar_30;
tmpvar_30 = (a_23 + tmpvar_29);
a_23 = tmpvar_30;
bvec4 tmpvar_31;
tmpvar_31 = greaterThan (uv_22, vec4(0.5, 0.5, 0.5, 0.5));
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_32;
2012-10-07 23:41:18 -04:00
tmpvar_32 = xll_vecTSel (tmpvar_31, vec4(1.0, 1.0, 1.0, 1.0), vec4(2.0, 2.0, 2.0, 2.0));
highp vec4 tmpvar_33;
tmpvar_33 = (a_23 + tmpvar_32);
a_23 = tmpvar_33;
bvec4 tmpvar_34;
tmpvar_34 = greaterThan (uv_22, vec4(0.5, 0.5, 0.5, 0.5));
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_35;
2012-10-07 23:41:18 -04:00
tmpvar_35 = xll_vecTSel (tmpvar_34, vec4(1.0, 1.0, 1.0, 1.0), vec4(2.0, 2.0, 2.0, 2.0));
highp vec4 tmpvar_36;
tmpvar_36 = (a_23 + tmpvar_35);
a_23 = tmpvar_36;
highp vec4 tmpvar_37;
tmpvar_37 = fract (uv_22);
bvec4 tmpvar_38;
tmpvar_38 = bvec4(tmpvar_37).xyzw;
2014-03-29 19:26:01 -04:00
mediump vec4 tmpvar_39;
2012-10-07 23:41:18 -04:00
tmpvar_39 = xll_vecTSel (tmpvar_38, vec4(1.0, 1.0, 1.0, 1.0), vec4(2.0, 2.0, 2.0, 2.0));
highp vec4 tmpvar_40;
tmpvar_40 = (a_23 + tmpvar_39);
a_23 = tmpvar_40;
return a_23;
2012-04-03 23:30:07 -04:00
}
void main ()
{
2012-10-07 23:41:18 -04:00
mediump vec4 xl_retval_41;
highp vec4 tmpvar_42;
tmpvar_42 = xlv_TEXCOORD0.xyzw;
mediump vec4 tmpvar_43;
tmpvar_43 = xlat_main (tmpvar_42);
mediump vec4 tmpvar_44;
tmpvar_44 = tmpvar_43;
xl_retval_41 = tmpvar_44;
mediump vec4 tmpvar_45;
tmpvar_45 = xl_retval_41.xyzw;
mediump vec4 tmpvar_46;
tmpvar_46 = tmpvar_45;
gl_FragData[0] = tmpvar_46;
2012-04-03 23:30:07 -04:00
}