i965: Rework brw_new_batch to actually start a new batch.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Oct 2013 02:23:53 +0000 (19:23 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 15 Nov 2013 18:24:07 +0000 (10:24 -0800)
commit4ec982ad012a563b7acf9ee8c7fd61140f24ea9d
treedc66556c34bc3eee13d9e0b2b3c3378accf69613
parent720d935fff1c7f49ce35369e00266cf2f333cdba
i965: Rework brw_new_batch to actually start a new batch.

Previously, brw_new_batch was called just after execbuf, but before
intel_batchbuffer_reset.  Essentially, it prepared for the creation of a
new batch, that wasn't yet available, and which it didn't create.  This
was a bit awkward.

This patch makes brw_new_batch call intel_batchbuffer_reset as the very
first operation.  This means that brw_new_batch actually creates a new
batchbuffer, and thus has it available.  It brings the creation of the
new batchbuffer and BRW_NEW_BATCH flagging together into one place.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/intel_batchbuffer.c