3 % for extension in extensions:
8 % if execution_stage == 'vs':
9 % for extension in extensions:
10 #extension ${extension}: enable
13 uniform ${input_type} given;
14 uniform ${output_type} expected;
23 % if execution_stage == 'vs':
24 color = vec4(0.0, 1.0, 0.0, 1.0);
26 if (expected.x != ${func}(${in_modifier_func}(given.x)))
28 if (expected.xy != ${func}(${in_modifier_func}(given.xy)))
30 if (expected.xyz != ${func}(${in_modifier_func}(given.xyz)))
32 if (expected != ${func}(${in_modifier_func}(given)))
38 % if execution_stage == 'fs':
39 % for extension in extensions:
40 #extension ${extension}: enable
43 uniform ${input_type} given;
44 uniform ${output_type} expected;
52 % if execution_stage == 'fs':
53 frag_color = vec4(0.0, 1.0, 0.0, 1.0);
55 if (expected.x != ${func}(${in_modifier_func}(given.x)))
57 if (expected.xy != ${func}(${in_modifier_func}(given.xy)))
59 if (expected.xyz != ${func}(${in_modifier_func}(given.xyz)))
61 if (expected != ${func}(${in_modifier_func}(given)))
76 % for name, data in sorted(test_data.items()):
77 % if name == '-0.0' and in_modifier_func != '' and func == 'intBitsToFloat':
78 # ${in_modifier_func}(INT_MIN) doesn't fit in a 32-bit int. Cannot test.
81 uniform ${input_type} given ${' '.join(str(in_func(d)) for d in data)}
82 uniform ${output_type} expected ${' '.join(str(out_func(modifier_func(in_func(d)))) for d in data)}
83 draw arrays GL_TRIANGLE_FAN 0 4
84 probe all rgba 0.0 1.0 0.0 1.0