radv: Add winsys functions for timeline syncobj.
[mesa.git] / src / amd / vulkan / radv_radeon_winsys.h
index 4830c7bf2bdc1c3c5392b206710625f169e88b5f..da410e5ef6337e99a0bd8578e9483a21f7503b0a 100644 (file)
@@ -168,8 +168,11 @@ struct radeon_winsys_bo {
 };
 struct radv_winsys_sem_counts {
        uint32_t syncobj_count;
+       uint32_t syncobj_reset_count; /* for wait only, whether to reset the syncobj */
+       uint32_t timeline_syncobj_count;
        uint32_t sem_count;
        uint32_t *syncobj;
+       uint64_t *points;
        struct radeon_winsys_sem **sem;
 };
 
@@ -255,9 +258,9 @@ struct radeon_winsys {
        void (*buffer_get_metadata)(struct radeon_winsys_bo *bo,
                                    struct radeon_bo_metadata *md);
 
-       void (*buffer_virtual_bind)(struct radeon_winsys_bo *parent,
-                                   uint64_t offset, uint64_t size,
-                                   struct radeon_winsys_bo *bo, uint64_t bo_offset);
+       VkResult (*buffer_virtual_bind)(struct radeon_winsys_bo *parent,
+                                       uint64_t offset, uint64_t size,
+                                       struct radeon_winsys_bo *bo, uint64_t bo_offset);
        VkResult (*ctx_create)(struct radeon_winsys *ws,
                               enum radeon_ctx_priority priority,
                               struct radeon_winsys_ctx **ctx);
@@ -325,9 +328,12 @@ struct radeon_winsys {
        void (*destroy_syncobj)(struct radeon_winsys *ws, uint32_t handle);
 
        void (*reset_syncobj)(struct radeon_winsys *ws, uint32_t handle);
-       void (*signal_syncobj)(struct radeon_winsys *ws, uint32_t handle);
+       void (*signal_syncobj)(struct radeon_winsys *ws, uint32_t handle, uint64_t point);
+       VkResult (*query_syncobj)(struct radeon_winsys *ws, uint32_t handle, uint64_t *point);
        bool (*wait_syncobj)(struct radeon_winsys *ws, const uint32_t *handles, uint32_t handle_count,
                             bool wait_all, uint64_t timeout);
+       bool (*wait_timeline_syncobj)(struct radeon_winsys *ws, const uint32_t *handles, const uint64_t *points,
+                                     uint32_t handle_count, bool wait_all, bool available, uint64_t timeout);
 
        int (*export_syncobj)(struct radeon_winsys *ws, uint32_t syncobj, int *fd);
        int (*import_syncobj)(struct radeon_winsys *ws, int fd, uint32_t *syncobj);