int index;
const uint32_t domain =
- target_bo->is_winsys_bo ? I915_GEM_DOMAIN_RENDER : 0;
+ (target_bo->flags & EXEC_OBJECT_WRITE) ? I915_GEM_DOMAIN_RENDER : 0;
VkResult result = anv_reloc_list_grow(list, alloc, 1);
if (result != VK_SUCCESS)
obj->relocs_ptr = 0;
obj->alignment = 0;
obj->offset = bo->offset;
- obj->flags = bo->is_winsys_bo ? EXEC_OBJECT_WRITE : 0;
+ obj->flags = bo->flags;
obj->rsvd1 = 0;
obj->rsvd2 = 0;
}
uint64_t size;
void *map;
- /* We need to set the WRITE flag on winsys bos so GEM will know we're
- * writing to them and synchronize uses on other rings (eg if the display
- * server uses the blitter ring).
- */
- bool is_winsys_bo;
+ /** Flags to pass to the kernel through drm_i915_exec_object2::flags */
+ uint32_t flags;
};
static inline void
bo->offset = -1;
bo->size = size;
bo->map = NULL;
- bo->is_winsys_bo = false;
+ bo->flags = 0;
}
/* Represents a lock-free linked list of "free" things. This is used by
goto fail_create_image;
memory = anv_device_memory_from_handle(memory_h);
- memory->bo.is_winsys_bo = true;
+
+ /* We need to set the WRITE flag on window system buffers so that GEM will
+ * know we're writing to them and synchronize uses on other rings (eg if
+ * the display server uses the blitter ring).
+ */
+ memory->bo.flags |= EXEC_OBJECT_WRITE;
anv_BindImageMemory(device_h, image_h, memory_h, 0);