[Mesa-dev] [PATCH 13/28] vulkan/wsi: Add a WSI_FROM_HANDLE macro
Jason Ekstrand
jason at jlekstrand.net
Thu Nov 16 21:29:01 UTC 2017
---
src/vulkan/wsi/wsi_common.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h
index 6741157..be45042 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -169,6 +169,9 @@ struct wsi_callbacks {
return (__VkType)(uintptr_t) _obj; \
}
+#define WSI_FROM_HANDLE(__wsi_type, __name, __handle) \
+ struct __wsi_type *__name = __wsi_type ## _from_handle(__handle)
+
WSI_DEFINE_NONDISP_HANDLE_CASTS(wsi_swapchain, VkSwapchainKHR)
#define ICD_DEFINE_NONDISP_HANDLE_CASTS(__VkIcdType, __VkType) \
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list