From 56ae163a201d36a09cd63acedffb2e915a4af3e1 Mon Sep 17 00:00:00 2001 From: "deasung.kim" Date: Fri, 15 Apr 2016 13:25:05 +0900 Subject: [PATCH] wsi: added func vk_get_tpl_display if tpl_display_create failed try tpl_display_get Change-Id: Ifb9add6c216b6eb3ad0d48efcb929c14d8b69338 --- src/wsi/wsi.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wsi/wsi.h b/src/wsi/wsi.h index 973f005..b1dd0f3 100644 --- a/src/wsi/wsi.h +++ b/src/wsi/wsi.h @@ -68,6 +68,15 @@ vk_realloc(const VkAllocationCallbacks *allocator, void *mem, size_t size, void vk_free(const VkAllocationCallbacks *allocator, void *mem); +static inline tpl_display_t * +vk_get_tpl_display(tpl_handle_t native_dpy) +{ + tpl_display_t *display = tpl_display_create(TPL_BACKEND_WAYLAND_VULKAN_WSI, native_dpy); + if (display == NULL) + display = tpl_display_get(native_dpy); + return display; +}; + PFN_vkVoidFunction vk_icd_get_proc_addr(VkInstance instance, const char *name); -- 2.7.4