http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #15 from Stefan Dösinger stefandoesinger@gmx.at 2008-11-02 17:14:19 --- You could try to implement a coordinate correction like this, but it is pretty tricky. Here are a few rules that have to be implemented:
1) No vertex or pixel shader: Correct the coords in the texture matrix 2) vertex shader, but no pixel shader: Correct the coords in the vertex shader 3) Pixel shader, vertex shader yes or no: Correct the coords in the pixel shader
(1) and (2) are needed because without a pixel shader there is no other option to fix the coordinates. OK, you may get away with it if a fixed function pipeline replacement is active, e.g. GL_ATI_fragment_shader, or GL_ARB_fragment_program, but this would be kinda ugly.
(3) is needed because pixel shaders can do arbitrary calculations in the texture coords before they sample the texture
Now the ugly part is that this adds many dependencies across different states. It ties pixel, vertex, texture, texture matrix states all together, although the are mostly independent right now. The performance implications would be not so good.
The other bad aspect is that the coordinate correction needs at least 2 single float uniforms per sampler, which are supposed to be available to the application. (even hardcoding the values into the shader won't help - the driver needs a uniform for this)
I think the best is to close this bug as WONTFIX and ignore the issue. It only occurs on one card type, the GeForce 5 series. All other cards either have native NP2 texture support, or the driver emulates it in hardware if we stick to the texture rectangle limitations.
I really hate to do that - my credo is that everything that works on Windows should work on Wine, with the same hardware, at the same feature level and the same performance. But this is one of the corner cases we can't fix.