/* [config]
 * expect_result: fail
 * glsl_version: 1.50
 * require_extensions: GL_ARB_gpu_shader_fp64
 * [end config]
 *
 * GL_ARB_gpu_shader_fp64 spec states:
 *
 *     "No implicit conversions are
 *      provided to convert from unsigned to signed integer types, from
 *      floating-point to integer types, or from higher-precision to
 *      lower-precision types.  There are no implicit array or structure
 *      conversions."
 */

#version 150
#extension GL_ARB_gpu_shader_fp64 : require

uniform dmat2x4 from;
uniform mat2x4 to;

in vec4 piglit_vertex;
out vec4 fs_color;

#define RED vec4(1.0, 0.0, 0.0, 1.0)
#define GREEN vec4(0.0, 1.0, 0.0, 1.0)

void main()
{
	gl_Position = piglit_vertex;
	mat2x4 converted = from;
	bool match = converted == to;
	fs_color = match ? GREEN : RED;
}
