diff options
author | Jason Ekstrand <[email protected]> | 2017-11-16 09:39:50 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 10:04:19 -0800 |
commit | 42dd06d957036ae68d6e670af8b156f15ac750ea (patch) | |
tree | a72bc06830a2cd88b4e9aacbc6dab173b20e86c2 /src | |
parent | 69365d72de7086bf10017ba896e68e3ebdf7b956 (diff) |
vulkan/wsi: Add a WSI_FROM_HANDLE macro
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/wsi/wsi_common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index a5e7e655fc8..229d3983af5 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -177,6 +177,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) \ |