From 27cc68d9e90c8d2031383fa6dc28fe910a351eb6 Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Tue, 13 Mar 2018 10:57:39 -0700 Subject: anv: For pinned BOs, skip relocations, but track bo usage References to pinned BOs won't need to be relocated at a later point, so just write the final value of the reference into the bo directly. Add a `set` to the relocation lists for tracking dependencies that were previously tracked by relocations. When a batch is executed, we add the referenced pinned BOs to the exec list. v2: - visit bos from the dependency set in a deterministic order (Jason) v3: - compar => compare, drat (Jason) - Reworded commit message, provided by (Jordan) Reviewed-by: Jordan Justen Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_private.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/intel/vulkan/anv_private.h') diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index bbbf7ecd4cf..d89e2dcc378 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -47,7 +47,9 @@ #include "blorp/blorp.h" #include "compiler/brw_compiler.h" #include "util/macros.h" +#include "util/hash_table.h" #include "util/list.h" +#include "util/set.h" #include "util/u_atomic.h" #include "util/u_vector.h" #include "util/vma.h" @@ -1076,6 +1078,7 @@ struct anv_reloc_list { uint32_t array_length; struct drm_i915_gem_relocation_entry * relocs; struct anv_bo ** reloc_bos; + struct set * deps; }; VkResult anv_reloc_list_init(struct anv_reloc_list *list, -- cgit v1.2.3