Mesa (master): anv: Stop setting domains to RENDER on EXEC_OBJECT_WRITE

Jason Ekstrand jekstrand at kemper.freedesktop.org
Mon Jul 10 15:56:01 UTC 2017


Module: Mesa
Branch: master
Commit: 781263486f4b828ab2b787d307f32ac65286f05a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=781263486f4b828ab2b787d307f32ac65286f05a

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Jul  7 10:57:09 2017 -0700

anv: Stop setting domains to RENDER on EXEC_OBJECT_WRITE

The reason we were doing this was to ensure that the kernel did the
appropriate cross-ring synchronization and flushing.  However, the
kernel only looks at EXEC_OBJECT_WRITE to determine whether or not to
insert a fence.  It only cares about the domain for determining whether
or not it needs to clflush the BO before using it for scanout but the
domain automatically gets set to RENDER internally by the kernel if
EXEC_OBJECT_WRITE is set.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/intel/vulkan/anv_batch_chain.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 9def174b42..9776a45b91 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -148,9 +148,6 @@ anv_reloc_list_add(struct anv_reloc_list *list,
    struct drm_i915_gem_relocation_entry *entry;
    int index;
 
-   const uint32_t domain =
-      (target_bo->flags & EXEC_OBJECT_WRITE) ? I915_GEM_DOMAIN_RENDER : 0;
-
    VkResult result = anv_reloc_list_grow(list, alloc, 1);
    if (result != VK_SUCCESS)
       return result;
@@ -163,8 +160,8 @@ anv_reloc_list_add(struct anv_reloc_list *list,
    entry->delta = delta;
    entry->offset = offset;
    entry->presumed_offset = target_bo->offset;
-   entry->read_domains = domain;
-   entry->write_domain = domain;
+   entry->read_domains = 0;
+   entry->write_domain = 0;
    VG(VALGRIND_CHECK_MEM_IS_DEFINED(entry, sizeof(*entry)));
 
    return VK_SUCCESS;




More information about the mesa-commit mailing list