summaryrefslogtreecommitdiff
path: root/generated_tests/templates/gen_conversion_int64/shader.vert.mako
blob: 2f3553d87a14a8778cb1ebb14ade28b6833b5f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## coding=utf-8
<%inherit file="shader_base.mako"/>\
uniform ${from_type} from;
uniform ${to_type} 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;
	${to_type} converted = ${converted_from};
	bool match = converted == to;
	fs_color = match ? GREEN : RED;
}