anv: add no reloc flags on empty and simple bo paths.
authorDave Airlie <airlied@redhat.com>
Wed, 12 Aug 2020 07:07:19 +0000 (17:07 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 14 Aug 2020 07:14:23 +0000 (17:14 +1000)
These two paths should have no relocs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6288>

src/intel/vulkan/anv_batch_chain.c

index d6311a66fa4b2c3794e7c0e8c15416363bfdb93e..823345eeec19a855da2f1a6451919155bb9b8a35 100644 (file)
@@ -1636,7 +1636,7 @@ setup_empty_execbuf(struct anv_execbuf *execbuf, struct anv_device *device)
       .buffer_count = execbuf->bo_count,
       .batch_start_offset = 0,
       .batch_len = 8, /* GEN7_MI_BATCH_BUFFER_END and NOOP */
-      .flags = I915_EXEC_HANDLE_LUT | I915_EXEC_RENDER,
+      .flags = I915_EXEC_HANDLE_LUT | I915_EXEC_RENDER | I915_EXEC_NO_RELOC,
       .rsvd1 = device->context_id,
       .rsvd2 = 0,
    };
@@ -1709,7 +1709,7 @@ anv_queue_execbuf_locked(struct anv_queue *queue,
          .buffer_count = execbuf.bo_count,
          .batch_start_offset = 0,
          .batch_len = submit->simple_bo_size,
-         .flags = I915_EXEC_HANDLE_LUT | I915_EXEC_RENDER,
+         .flags = I915_EXEC_HANDLE_LUT | I915_EXEC_RENDER | I915_EXEC_NO_RELOC,
          .rsvd1 = device->context_id,
          .rsvd2 = 0,
       };