From 6ebf677cfd80e0df8cc6042734823cf53ce1b941 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 21 Nov 2019 06:00:14 -0600 Subject: [PATCH] anv: Always add in EXEC_OBJECT_WRITE when specified in extra_flags Otherwise, we're trusting in the execbuf_add_bo which sets EXEC_OBJECT_WRITE to to always be the first one that gets called. This is likely true for fences but it seems somewhat fragile. Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_batch_chain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index f58299b6760..67bd4df64bd 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1136,6 +1136,11 @@ anv_execbuf_add_bo(struct anv_device *device, obj->rsvd2 = 0; } + if (extra_flags & EXEC_OBJECT_WRITE) { + obj->flags |= EXEC_OBJECT_WRITE; + obj->flags &= ~EXEC_OBJECT_ASYNC; + } + if (relocs != NULL) { assert(obj->relocation_count == 0); -- 2.30.2