https://bugs.freedesktop.org/show_bug.cgi?id=89012
--- Comment #5 from Axel Davy axel.davy@ens.fr --- Created attachment 114504 --> https://bugs.freedesktop.org/attachment.cgi?id=114504&action=edit Additionnal test
Additional test that draws a square of size 256 * 24.
The pos coordinates of the square are (-1-(1/256), 1+(1/16)) and (1-(1/256), -1+(1/16))
the first texcoord a is 0 for the left of the square and 1 for the right the second texcoord b is 0 at the top, 23 at the bottom.
the images shows the b-th bit of the mantisse of a.
On ilo, nouveau and llvmpipe, the image is black, except at the top, where we see some white pixels with a specific scheme. On radeonsi and r600, the top right triangle is the same than for the others, but the bottom left triangle is almost full white.
This shows that the texcoord a has a value just below what it should have for this triangle. This is the root of the problem, as the game shader with the problem multiplies the texcoord value by a power of two, and then applies floor. Because of this bug, it gets off by one problem.
This 'little below expected value on one of the triangle' problem doesn't depend on the half_pixel_center = 0 parameter. It just happens that for what the game does, the texcoord value with half_pixel_center = 1 instead of 0 (which would be correct value for nine), is above what it should be, and then with the floor, the result is correct and not off by one.