From a3a998f19a3699755ce50cbe5480b6f12ce89015 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 23 Jun 2018 12:48:37 -0700 Subject: [PATCH] iris: iris - fix QWord aligned endings after batch chaining rework I need to save the primary batch size after expanding it to include MI_BATCH_BUFFER_END and the QWord padding NOP --- src/gallium/drivers/iris/iris_batch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index aaf2e04f049..a7fc7f710ef 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -328,9 +328,6 @@ iris_batch_emit(struct iris_batch *batch, const void *data, unsigned size) static void iris_finish_batch(struct iris_batch *batch) { - if (batch->bo == batch->exec_bos[0]) - batch->primary_batch_size = batch_bytes_used(batch); - // XXX: ISP DIS /* Emit MI_BATCH_BUFFER_END to finish our batch. Note that execbuf2 @@ -344,6 +341,9 @@ iris_finish_batch(struct iris_batch *batch) map[1] = 0; batch->map_next += qword_aligned ? 8 : 4; + + if (batch->bo == batch->exec_bos[0]) + batch->primary_batch_size = batch_bytes_used(batch); } static int -- 2.30.2