[Mesa-dev] [PATCH 00/17] i965: Growing the batch buffer, separate state buffers

Kenneth Graunke kenneth at whitecape.org
Wed Sep 6 00:09:33 UTC 2017


Hello,

This series separates GPU commands and indirect state into two distinct
buffers - the batch buffer and the state buffer.  It then adds support
for growing the batch/state buffers, in case we need more space but are
in a "critical section" where we can't safely "wrap" (flush) the batch.
Growing ends up being fairly cheap, especially on modern kernels where
we have I915_EXEC_HANDLE_LUT and I915_EXEC_BATCH_FIRST.

We then drop the BATCH_RESERVED logic (no one will miss that math) and
most of the estimated max prim arithmetic (we still estimate, but the
consequence is a small amount of overhead rather than certain death).

This fixes a long standing bug, and also opens up the possibility of
having larger batches.

A couple issues remain: the series drops the malloc'd shadow copy of
the batch for non-LLC systems.  I haven't checked how dire this is.
The last patch also dramatically impacts batch sizes, which we'll need
to benchmark.  However, I thought I'd get the code out there for review
before finishing that - I don't expect the mechanics to change much.

Enjoy!



More information about the mesa-dev mailing list