1 <%! from six.moves import range %>
2 ## Test execution of unpack2x16 functions in the vertex shader.
8 #extension GL_ARB_shading_language_packing : require
11 const vec4 red = vec4(1, 0, 0, 1);
12 const vec4 green = vec4(0, 1, 0, 1);
14 uniform highp uint func_input;
18 % for j in range(func.num_valid_outputs):
19 uniform ${func.result_precision} ${func.vector_type} expect${j};
29 ${func.result_precision} ${func.vector_type} actual = ${func.name}(func_input);
32 % for i in range(func.num_valid_outputs):
33 || (exact ? actual == expect${i} : distance(actual, expect${i}) < 0.00001)
44 precision highp float;
52 frag_color = vert_color;
63 % for io in func.inout_seq:
64 uniform uint func_input ${io.input}
68 uniform int exact ${int(int(io.input[:-1]) in (0x0, 0xffffffff, 0x80808080,
71 % for j in range(func.num_valid_outputs):
72 uniform ${func.vector_type} expect${j} ${" ".join(io.valid_outputs[j])}
74 draw arrays GL_TRIANGLE_FAN 0 4
75 probe all rgba 0.0 1.0 0.0 1.0