intel: Reserve enough space to finish occlusion queries on Gen6.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 10 Aug 2012 17:26:04 +0000 (10:26 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 13 Aug 2012 03:12:28 +0000 (20:12 -0700)
commit4e087de51ad0e7ba4a7199d3664e1d096f8dc510
treebdfa506a960de349586d984208c88a615674e829
parent9da50667f490ba2c6240f4c91c9707e3f181adae
intel: Reserve enough space to finish occlusion queries on Gen6.

After realizing that brw_finish_batch emitted some final PIPE_CONTROLs
to record occlusion queries, Chris noted that we probably hadn't
reserved enough space to actually emit them.

Reserving a full 60 bytes seems a bit harsh, since we only need that
much if occlusion queries are actually active.  Plus, 28 bytes would be
sufficient for Gen7, and 24 for Gen4-5.

We could optimize this in the future, but it doesn't seem too critical.

NOTE: This is a candidate for stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vtbl.c
src/mesa/drivers/dri/intel/intel_batchbuffer.h