VK_ENTRY_POINT(GetPhysicalDeviceWaylandPresentationSupportKHR,INSTANCE),
VK_ENTRY_POINT(GetInstanceProcAddr, INSTANCE),
VK_ENTRY_POINT(GetDeviceProcAddr, DEVICE),
+ VK_ENTRY_POINT(CreateTBMQueueSurfaceKHR, INSTANCE),
};
static const vk_entry_t *
return VK_ERROR_EXTENSION_NOT_PRESENT;
}
}
+
+VKAPI_ATTR VkResult VKAPI_CALL
+vk_CreateTBMQueueSurfaceKHR(VkInstance instance,
+ const tbm_bufmgr bufmgr,
+ const tbm_surface_queue_h queue,
+ const VkAllocationCallbacks *allocator,
+ VkSurfaceKHR *surface)
+{
+ vk_tbm_queue_surface_t *sfc = NULL;
+
+ allocator = vk_get_allocator(instance, allocator);
+
+ sfc = vk_alloc(allocator, sizeof(vk_tbm_queue_surface_t), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+ VK_CHECK(sfc, return VK_ERROR_OUT_OF_HOST_MEMORY, "vk_alloc() failed.\n");
+
+ sfc->base.platform = VK_ICD_WSI_PLATFORM_TBM_QUEUE;
+ sfc->bufmgr = bufmgr;
+ sfc->tbm_queue = queue;
+
+ *surface = (VkSurfaceKHR)(uintptr_t)sfc;
+
+ return VK_SUCCESS;
+}
typedef struct vk_display_plane vk_display_plane_t;
typedef struct vk_display_mode vk_display_mode_t;
typedef struct vk_icd vk_icd_t;
+typedef struct vk_tbm_queue_surface vk_tbm_queue_surface_t;
struct vk_icd {
void *lib;
void *backend_data;
};
+struct vk_tbm_queue_surface {
+ VkIcdSurfaceBase base;
+ tbm_bufmgr bufmgr;
+ tbm_surface_queue_h tbm_queue;
+};
+
VkBool32
vk_physical_device_init_display(vk_physical_device_t *pdev);
vk_EnumerateDeviceExtensionProperties(VkPhysicalDevice pdev, const char *layer_name,
uint32_t *count, VkExtensionProperties *extensions);
+VKAPI_ATTR VkResult VKAPI_CALL
+vk_CreateTBMQueueSurfaceKHR(VkInstance instance,
+ const tbm_bufmgr bufmgr, const tbm_surface_queue_h queue,
+ const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *surface);
#endif /* WSI_H */