i965 new VS: Fix bugs in pre-GEN6 psiz/flags computation
authorPaul Berry <stereotype441@gmail.com>
Sat, 24 Sep 2011 04:36:17 +0000 (21:36 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 28 Sep 2011 18:38:04 +0000 (11:38 -0700)
commit64ce64a3f88f0c33a3f9a97f231bd98983887e27
tree5557401027a10143dfb3dfd3459d37d7ce592895
parentcc3a699e32bed62c38b3b2de280973f067962504
i965 new VS: Fix bugs in pre-GEN6 psiz/flags computation

This patch corrects two errors in the computation of the psiz/flags
VUE slot on pre-GEN5 when using the new VS backend:

- The clip flags (which should be stored in the w component of the
  first VUE slot) were being accidentally duplicated in all other
  components of that VUE slot, causing partially clipped triangles to
  sometimes disappear completely.

- The OR instruction wasn't being stored in "inst", causing the
  BRW_PREDICATE_NORMAL flag to be applied to the wrong instruction.

This patch fixes regressions in clipping behavior when using shaders
on GEN4-5.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp