1 # Intel compiler has a very old optimization for various combination
2 # of u2f or i2f of an extract_* source. However, the variations that
3 # do u2f of an extract_i* are incorrect.
5 # There are two ways the fast path could be incorrect. It could either
8 # mov(8) g1F, g2<4,1,0>B
12 # mov(8) g1F, g2<4,1,0>UB
14 # The former produce -1.0 and the latter would produce 255.0. The
15 # current incorrect implementation just happens to be the former, but
16 # the latter has equal probability of being implemented. I implemented
17 # the test so either of the possible incorrect fast path
18 # implementations would render blue, but any other kind of bug would
24 [vertex shader passthrough]
29 uniform int a = 0x000000ff;
33 float f = float(uint((a << 24) >> 24));
35 if (f == float(uint(0xffffffff))) {
36 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
38 gl_FragColor = (f == 255.0 || f == -1.0)
39 ? vec4(0.0, 0.0, 1.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
45 probe all rgba 0.0 1.0 0.0 1.0