i965/Gen6-7: Do not replace texcoords with point coord if not drawing points
authorChris Forbes <chrisf@ijw.co.nz>
Mon, 24 Nov 2014 20:44:19 +0000 (09:44 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Tue, 25 Nov 2014 09:38:32 +0000 (22:38 +1300)
commit0008d0e59eff365079323918508ffc87355a6bfd
treea2bb17679ce40fddfb0b9ce718dd9bac51f3ec44
parent60f011af1a370004333cbc3fee7fec137ebd9d6a
i965/Gen6-7: Do not replace texcoords with point coord if not drawing points

Fixes broken rendering in Windows-based QtQuick2 apps run through Wine.
This library sets all texture units' GL_COORD_REPLACE, leaves point
sprite mode enabled, and then draws a triangle fan.

Will need a slightly different fix for Gen4-5, but I don't have my old
machines in a usable state currently.

V2: - Simplify patch -- the real changes are no longer duplicated across
      the Gen6 and Gen7 atoms.
    - Also don't clobber attr overrides -- which matters on Haswell too,
      and fixes the other half of the problem
    - Fix newly-introduced warnings
V3: - Use BRW_NEW_GEOMETRY_PROGRAM and brw->geometry_program rather than
      core flag and state; keep the state flags in order.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84651
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c