i965: fix inverted point sprite origin when rendering to FBO
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 19 Jan 2012 23:48:52 +0000 (07:48 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 28 Jan 2012 01:59:13 +0000 (09:59 +0800)
commiteaf360e5bffc5630789367020252cd12fe586177
tree55370eabae63dfcca904454b212fe1bbcbc5f1bc
parentd250287d53c0dcd936ca632f4d991ffaac6693c2
i965: fix inverted point sprite origin when rendering to FBO

When rendering to FBO, rendering is inverted. At the same time, we would
also make sure the point sprite origin is inverted. Or, we will get an
inverted result correspoinding to rendering to the default winsys FBO.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44613

NOTE: This is a candidate for stable release branches.

v2: add the simliar logic to ivb, too (comments from Ian)
    simplify the logic operation (comments from Brian)

v3: pick a better comment from Eric
    use != for the logic instead of ^ (comments from Ian)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c