3 GL_MESA_shader_integer_functions
5 [vertex shader passthrough]
8 #extension GL_MESA_shader_integer_functions : enable
13 uniform uvec4 expected_sum;
17 frag_color = vec4(0.0, 1.0, 0.0, 1.0);
19 /* Test that optimization passes like dead code elimination don't
20 * eliminate the addition if the carry result isn't used.
23 uvec4 sum = uaddCarry(x, y, carry);
25 if (sum != expected_sum)
30 uniform uvec4 x 0 1 2 3
31 uniform uvec4 y 1 2 3 4
32 uniform uvec4 expected_sum 1 3 5 7
34 probe all rgba 0.0 1.0 0.0 1.0
36 uniform uvec4 x 0 1 1 2
37 uniform uvec4 y 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFE 0xFFFFFFFE
38 uniform uvec4 expected_sum 0xFFFFFFFF 0 0xFFFFFFFF 0
40 probe all rgba 0.0 1.0 0.0 1.0
42 uniform uvec4 x 2 3 2 3
43 uniform uvec4 y 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFE 0xFFFFFFFE
44 uniform uvec4 expected_sum 1 2 0 1
46 probe all rgba 0.0 1.0 0.0 1.0
48 uniform uvec4 x 0x80000000 0x80000000 0x80000000 0x80000001
49 uniform uvec4 y 0x80000000 0x80000001 0x7FFFFFFF 0x7FFFFFFF
50 uniform uvec4 expected_sum 0 1 0xFFFFFFFF 0
52 probe all rgba 0.0 1.0 0.0 1.0