summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_batch.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-05-02 22:01:10 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:06 -0800
commit48ddd7212d0667f223fc6336478abe5a8080d660 (patch)
tree5fe8e502090eded3d4683e6e2768e461963fd7de /src/gallium/drivers/iris/iris_batch.c
parentf31eea1f008a1c34cdd9f8ca4be0f54aa91f13de (diff)
iris: fix decoding and undo testing code
Diffstat (limited to 'src/gallium/drivers/iris/iris_batch.c')
-rw-r--r--src/gallium/drivers/iris/iris_batch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c
index e3e38b2c27d..a1fbd3e3183 100644
--- a/src/gallium/drivers/iris/iris_batch.c
+++ b/src/gallium/drivers/iris/iris_batch.c
@@ -321,6 +321,9 @@ 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
@@ -357,8 +360,7 @@ submit_batch(struct iris_batch *batch, int in_fence_fd, int *out_fence_fd)
.buffers_ptr = (uintptr_t) batch->validation_list,
.buffer_count = batch->exec_count,
.batch_start_offset = 0,
- .batch_len = batch->bo == batch->exec_bos[0] ? batch_bytes_used(batch)
- : batch->primary_batch_size,
+ .batch_len = batch->primary_batch_size,
.flags = batch->ring |
I915_EXEC_NO_RELOC |
I915_EXEC_BATCH_FIRST |