[Mesa-dev] [PATCH 01/17] i965: Don't special case the batchbuffer when reference counting.

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 6 09:25:33 UTC 2017


Quoting Kenneth Graunke (2017-09-06 01:09:34)
> 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.

I left it around since the conditional atomic was a slight advantage.
But if it gets in the way of future cleanup,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the mesa-dev mailing list