blob: df350fa4dc7f06c94249eb4c5d9a932a0ab2b76b [file] [log] [blame]
uniform half4 colorGreen;
uniform half4 colorRed;
bool test_scalar_0();
bool test_vector_0();
bool test_matrix_0();
bool test_array_0();
bool highp_param_0(float value);
bool mediump_param_0(half value);
bool lowp_param_0(half value);
bool test_scalar_0()
{
half mp = 0.5;
float hp = float(mp);
int ihp = 2;
short imp = short(ihp);
return float(mp) == hp && ihp == int(imp);
}
bool test_vector_0()
{
half2 mp2 = half2(2.0);
float2 hp2 = float2(mp2);
half3 mp3 = half3(3.0);
float3 hp3 = float3(mp3);
half4 mp4 = half4(4.0);
float4 hp4 = float4(mp4);
int2 ihp2 = int2(2);
short2 imp2 = short2(ihp2);
int3 ihp3 = int3(3);
short3 imp3 = short3(ihp3);
int4 ihp4 = int4(4);
short4 imp4 = short4(ihp4);
return ((((float2(mp2) == hp2 && hp3 == float3(mp3)) && float4(mp4) == hp4) && int2(imp2) == ihp2) && ihp3 == int3(imp3)) && int4(imp4) == ihp4;
}
bool test_matrix_0()
{
half2x2 mp2 = half2x2(2.0);
float2x2 hp2 = float2x2(mp2);
half3x3 mp3 = half3x3(3.0);
float3x3 hp3 = float3x3(mp3);
half4x4 mp4 = half4x4(4.0);
float4x4 hp4 = float4x4(mp4);
return (float2x2(mp2) == hp2 && hp3 == float3x3(mp3)) && float4x4(mp4) == hp4;
}
bool test_array_0()
{
half mf[1];
mf[0] = 1.0;
float hf[1];
hf[0] = 1.0;
half2 mv[2];
mv[0] = half2(0.0, 1.0);
mv[1] = half2(2.0, 3.0);
float2 hv[2];
hv[0] = float2(0.0, 1.0);
hv[1] = float2(2.0, 3.0);
return (float(mf[0]) == hf[0] && hv[0] == float2(mv[0])) && float2(mv[1]) == hv[1];
}
bool highp_param_0(float value)
{
return value == 1.0;
}
bool mediump_param_0(half value)
{
return value == 2.0;
}
bool lowp_param_0(half value)
{
return value == 3.0;
}
float4 main(float2 coords)
{
float4 zero = float4(0.0);
half4 one = half4(1.0);
half4 green = colorGreen;
green = half4(float4(green * one) + zero);
float4 red = float4(colorRed);
red = (red + zero) * float4(one);
return half4((((((test_scalar_0() && test_vector_0()) && test_matrix_0()) && test_array_0()) && highp_param_0(1.0)) && mediump_param_0(2.0)) && lowp_param_0(3.0) ? float4(green) : red);
}