diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2012-06-28 10:32:09 -0700 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2012-07-02 11:42:48 -0700 |
commit | 8aa78c104a6fa9497cba558b54c41f6f2292bd74 (patch) | |
tree | 7caae1f4b41decbe3b68b2d1aab3b40b5f2ec5ce /src/mesa/drivers/dri/i965/brw_primitive_restart.c | |
parent | 14311ef3f2031307fb660328db14eb535da9a4fa (diff) | |
download | external_mesa3d-8aa78c104a6fa9497cba558b54c41f6f2292bd74.zip external_mesa3d-8aa78c104a6fa9497cba558b54c41f6f2292bd74.tar.gz external_mesa3d-8aa78c104a6fa9497cba558b54c41f6f2292bd74.tar.bz2 |
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_primitive_restart.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_primitive_restart.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c index 962ff18..02deba4 100644 --- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c +++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c @@ -69,6 +69,18 @@ can_cut_index_handle_prims(struct gl_context *ctx, GLuint nr_prims, const struct _mesa_index_buffer *ib) { + struct brw_context *brw = brw_context(ctx); + + if (brw->sol.counting_primitives_generated || + brw->sol.counting_primitives_written) { + /* Counting primitives generated in hardware is not currently + * supported, so take the software path. We need to investigate + * the *_PRIMITIVES_COUNT registers to allow this to be handled + * entirely in hardware. + */ + return false; + } + if (!can_cut_index_handle_restart_index(ctx, ib)) { /* The primitive restart index can't be handled, so take * the software path |