i965: fix transform feedback with primitive restart
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 28 Jun 2012 17:32:09 +0000 (10:32 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 2 Jul 2012 18:42:48 +0000 (11:42 -0700)
commit8aa78c104a6fa9497cba558b54c41f6f2292bd74
tree7caae1f4b41decbe3b68b2d1aab3b40b5f2ec5ce
parent14311ef3f2031307fb660328db14eb535da9a4fa
i965: fix transform feedback with primitive restart

When querying GL_PRIMITIVES_GENERATED, if primitive restart
is also used, then take the software primitive restart
path so GL_PRIMITIVES_GENERATED is returned correctly.

GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN is also updated
since it will also affected by the same issue.

As noted in brw_primitive_restart.c, with further work we
should be able to move this situation back to a hardware
handled path.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_primitive_restart.c
src/mesa/drivers/dri/i965/brw_queryobj.c