Quoting Kenneth Graunke (2017-07-19 23:43:04) > On Wednesday, July 19, 2017 3:09:17 AM PDT Chris Wilson wrote: > > Even if we are using older kernels that do not accept the batch in the > > first slot, we can simplify our code by creating the batch with itself > > in the first slot and moving it to the end on execbuf submission. > > --- > > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 70 > > ++++++++++++--------------- > > 1 file changed, 31 insertions(+), 39 deletions(-) > > Alternatively, instead of swapping them out, we could simply add_exec_bo the > batch at the end, and in execbuffer() do: > > if (!use_batch_first) { > execbuf.buffers_ptr++; > execbuf.buffers_count--; > } > > to skip over the batchbuffer entry at the beginning. That seems easier...
Ran into trouble with this because of the deduplication we do for batch->exec_bos[]. It kept insisting that I had added the batch first... Doing a swap of first/last validation entry looks more pleasant than the various hacks I have to skip the deduplication, or add a special case add_batch_bo(). -Chris _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev