3 GL_MESA_shader_integer_functions
6 #extension GL_MESA_shader_integer_functions : enable
16 gl_Position = piglit_vertex;
18 /* Green if both pass. */
19 color = vec4(0.0, 1.0, 0.0, 1.0);
21 if (lsb != findLSB(iinput))
22 /* Red if findLSB(ivec4) fails. */
23 color = vec4(1.0, 0.0, 0.0, 1.0);
24 else if (lsb != findLSB(uinput))
25 /* Blue if findLSB(uvec4) fails. */
26 color = vec4(0.0, 0.0, 1.0, 1.0);
39 # If value is zero, -1 will be returned.
40 uniform ivec4 lsb -1 -1 -1 -1
41 uniform ivec4 iinput 0 0 0 0
42 uniform uvec4 uinput 0 0 0 0
44 probe all rgba 0.0 1.0 0.0 1.0
46 uniform ivec4 lsb 0 1 0 2
47 uniform ivec4 iinput 1 2 3 4
48 uniform uvec4 uinput 1 2 3 4
50 probe all rgba 0.0 1.0 0.0 1.0
52 uniform ivec4 lsb 10 9 8 7
53 uniform ivec4 iinput 1024 512 256 128
54 uniform uvec4 uinput 1024 512 256 128
56 probe all rgba 0.0 1.0 0.0 1.0
58 uniform ivec4 lsb 0 1 0 2
59 uniform ivec4 iinput -1 -2 -3 -4
60 uniform uvec4 uinput 0xFFFFFFFF 0xFFFFFFFE 0xFFFFFFFD 0xFFFFFFFC
62 probe all rgba 0.0 1.0 0.0 1.0
64 uniform ivec4 lsb 31 30 29 28
65 uniform ivec4 iinput -2147483648 1073741824 536870912 268435456
66 uniform uvec4 uinput 0x80000000 0x40000000 0x20000000 0x10000000
68 probe all rgba 0.0 1.0 0.0 1.0