[i915] Incorrect GLSL texture mapping (TEX/TEXLD vs TXP/TEXLDP)
Submitted by Krzysztof Kotlenga
Assigned to Ian Romanick
Created attachment 66810 Incorrect rendering example
The problem is that perspective correct mapping is not being done at all. I've tried to do some basic analysis to help as much as I could, so:
- the problem doesn't happen with i915g
- it doesn't happen with the 'reflect' mesa demo (no GLSL -> correct rendering)
- affects mesa as old as 7.11 from Fedora 16 and as new as mesa 9.0-devel (git-a96119cc) (8.0.4 too, haven't checked other versions)
I think (hope) that the interesting thing to note here is that - as I've seen with INTEL_DEBUG=wm - the 'reflect' demo results in TEXLDP instruction being used, while any WebGL (effectively GLSL) demos only show TEXLD.
I know that throwing WebGL implementation at the i915 might not be the best test case, but I couldn't get any native GLSL demo running. WebGL demos mostly work fine though and are easy to run:
The shaders are also extremely simple. The attached screenshot shows the demo from the second link with a different texture. Chromium/Mozilla - doesn't matter.
Also (mis)reported elsewhere: "WebGL w. MESA driver results in affine texture mapping" http://code.google.com/p/chromium/issues/detail?id=135332