meta: Allow meta operations to pause/resume an active occlusion query
authorCarl Worth <cworth@cworth.org>
Thu, 13 Dec 2012 19:15:03 +0000 (11:15 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 15 Jan 2013 21:34:18 +0000 (13:34 -0800)
commitc0b768ffee1ba84a4fcfcf41adf60e6d50cbafee
treeeefcc9f83c88bbe6db4cfdb5a63d10e703d5683f
parent3dd76f7168bba6123c9ac5e2442b8c811f40399f
meta: Allow meta operations to pause/resume an active occlusion query

This allows for avoiding the occlusion query erroneously accumulating results
during the meta operation. This functionality is made conditional on a new
MESA_META_OCCLUSION_QUERY bit so that meta-operations which should generate
fragments can continue to get the current behavior.

The implementation of glClear is specifically augmented to request the flag
since glClear is specified to not generate fragments.

This fixes the following es3conform tests:

occlusion_query_draw_occluded.test
  occlusion_query_clear
occlusion_query_custom_framebuffer
occlusion_query_stencil_test
occlusion_query_discarded_fragments

As well as the following piglit test:

occlusion_query_meta_no_fragments

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/common/meta.c
src/mesa/drivers/common/meta.h