A requirement for NORELOC is that the relocation entry exactly matches
the content of the buffer, and so we must set the value in the buffer on
adding the relocation.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 src/intel/vulkan/anv_batch_chain.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c 
b/src/intel/vulkan/anv_batch_chain.c
index 8edc2b521e..fe27038cd3 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -534,9 +534,12 @@ anv_batch_bo_list_clone(const struct list_head *list,
             prev_bbo->relocs.num_relocs--;
 
          const int reloc_size = cmd_buffer->device->info.gen < 8 ? 4 : 8;
+         uint64_t address;
          anv_reloc_list_add(&prev_bbo->relocs, &cmd_buffer->pool->alloc,
                             prev_bbo->length - reloc_size, &new_bbo->bo, 0,
-                            NULL);
+                            &address);
+         memcpy(prev_bbo->bo.map + prev_bbo->length - reloc_size,
+                &address, reloc_size);
       }
 
       prev_bbo = new_bbo;
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to