#define RADV_MAX_QUEUE_FAMILIES 3
+struct radv_deferred_queue_submission;
+
enum ring_type radv_queue_family_to_ring(int f);
struct radv_queue {
struct list_head pending_submissions;
pthread_mutex_t pending_mutex;
+
+ pthread_mutex_t thread_mutex;
+ pthread_cond_t thread_cond;
+ struct radv_deferred_queue_submission *thread_submission;
+ pthread_t submission_thread;
+ bool thread_exit;
+ bool thread_running;
};
struct radv_bo_list {
struct radv_image *image,
const VkImageSubresourceRange *range);
+typedef enum {
+ RADV_FENCE_NONE,
+ RADV_FENCE_WINSYS,
+ RADV_FENCE_SYNCOBJ,
+ RADV_FENCE_WSI,
+} radv_fence_kind;
+
+struct radv_fence_part {
+ radv_fence_kind kind;
+
+ union {
+ /* AMDGPU winsys fence. */
+ struct radeon_winsys_fence *fence;
+
+ /* DRM syncobj handle for syncobj-based fences. */
+ uint32_t syncobj;
+
+ /* WSI fence. */
+ struct wsi_fence *fence_wsi;
+ };
+};
+
struct radv_fence {
struct vk_object_base base;
- struct radeon_winsys_fence *fence;
- struct wsi_fence *fence_wsi;
-
- uint32_t syncobj;
- uint32_t temp_syncobj;
+ struct radv_fence_part permanent;
+ struct radv_fence_part temporary;
};
/* radv_nir_to_llvm.c */