i965: Don't special case the batchbuffer when reference counting.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Sep 2017 00:32:01 +0000 (17:32 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 8 Sep 2017 07:21:09 +0000 (00:21 -0700)
commit44ac54a3fdcb0dd54ea0cf3f2e5738958aab8010
treebdc3c0aa36a9b5f57a4018f4375045b6ee2b5053
parentb909d278d0194a1fd289348df9dd5a71f9808d98
i965: Don't special case the batchbuffer when reference counting.

We don't need to special case the batch - when we add the batch to the
validation list, we can simply increase the refcount to 2, and when we
make a new batch, we'll drop it back down to 1 (when unreferencing all
buffers in the validation list).  The final reference is still held by
brw->batch.bo, as it was before.

This removes the special case from a bunch of loops.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/intel_batchbuffer.c