3 GL_MESA_shader_integer_functions
5 [vertex shader passthrough]
8 #extension GL_MESA_shader_integer_functions : enable
13 uniform uvec4 expected_diff;
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 subtraction if the borrow result isn't used.
23 uvec4 diff = usubBorrow(x, y, borrow);
25 if (diff != expected_diff)
30 uniform uvec4 x 1 2 3 4
31 uniform uvec4 y 0 1 2 3
32 uniform uvec4 expected_diff 1 1 1 1
34 probe all rgba 0.0 1.0 0.0 1.0
36 uniform uvec4 x 4 3 2 1
37 uniform uvec4 y 4 4 4 4
38 uniform uvec4 expected_diff 0 0xFFFFFFFF 0xFFFFFFFE 0xFFFFFFFD
40 probe all rgba 0.0 1.0 0.0 1.0
42 uniform uvec4 x 0xFFFFFFFE 0xFFFFFFFF 0x80000000 0
43 uniform uvec4 y 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0
44 uniform uvec4 expected_diff 0xFFFFFFFF 0 0x80000001 0
46 probe all rgba 0.0 1.0 0.0 1.0