iris/batch: Add exec_flags field
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 31 Aug 2021 20:22:24 +0000 (13:22 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Fri, 3 Dec 2021 00:30:57 +0000 (16:30 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12692>

src/gallium/drivers/iris/iris_batch.c
src/gallium/drivers/iris/iris_batch.h

index 6665106..47c7208 100644 (file)
@@ -242,6 +242,7 @@ iris_init_non_engine_contexts(struct iris_context *ice, int priority)
    for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
       struct iris_batch *batch = &ice->batches[i];
       batch->hw_ctx_id = iris_create_hw_context(screen->bufmgr);
+      batch->exec_flags = I915_EXEC_RENDER;
       assert(batch->hw_ctx_id);
       iris_hw_context_set_priority(screen->bufmgr, batch->hw_ctx_id, priority);
    }
@@ -842,7 +843,7 @@ submit_batch(struct iris_batch *batch)
       .batch_start_offset = 0,
       /* This must be QWord aligned. */
       .batch_len = ALIGN(batch->primary_batch_size, 8),
-      .flags = I915_EXEC_RENDER |
+      .flags = batch->exec_flags |
                I915_EXEC_NO_RELOC |
                I915_EXEC_BATCH_FIRST |
                I915_EXEC_HANDLE_LUT,
index b568239..230d63b 100644 (file)
@@ -80,6 +80,7 @@ struct iris_batch {
    uint64_t last_surface_base_address;
 
    uint32_t hw_ctx_id;
+   uint32_t exec_flags;
 
    /** A list of all BOs referenced by this batch */
    struct iris_bo **exec_bos;