i965: Fix the W value of deprecated pointcoords on pre-gen6.
authorEric Anholt <eric@anholt.net>
Wed, 20 Feb 2013 22:00:47 +0000 (14:00 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 25 Feb 2013 19:21:44 +0000 (11:21 -0800)
commit50a5d5dea0c21886bc3445c0ad0928b03e64ab10
tree0a12e1ac0bd278de6e78dcbed4db41cc64033bce
parent3cdb548bfbc77522ed4e956f7457c8339182ff8c
i965: Fix the W value of deprecated pointcoords on pre-gen6.

When you didn't have a texcoord array bound (or a non-1 current w
attrib), we were telling the fragment shader that it could just use "1"
instead of doing expensive pre-gen6 math to invert it.  If you drew the
point with a non-1 W value, then you'd get the right size (since all the
vertex computations worked), but we'd mis-interpolate the coordinate
across the face.

Fixes the mesa pointsprite demo on GM45.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30232
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Note: This is a candidate for the stable branches.
src/mesa/drivers/dri/i965/brw_vs_constval.c