summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi/wsi_common_x11.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-11-25 15:15:09 +0000
committerEric Engestrom <[email protected]>2019-03-11 10:49:36 +0000
commitf9a6460bbff16abf337e1267c534da96035e7ac6 (patch)
treebe615d5cb2ea508e73718ef9aada591c706a7dd7 /src/vulkan/wsi/wsi_common_x11.c
parentf2e24dd81d338421de63d66b0988fd4f0e72db8e (diff)
wsi/x11: use WSI_FROM_HANDLE() instead of pointer casts
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common_x11.c')
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 0aa71ca6f2e..04ef9148f90 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -720,6 +720,7 @@ struct x11_swapchain {
struct x11_image images[0];
};
+WSI_DEFINE_NONDISP_HANDLE_CASTS(x11_swapchain, VkSwapchainKHR)
/**
* Update the swapchain status with the result of an operation, and return
@@ -1360,7 +1361,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
* mode which provokes reallocation when anything changes, to make
* sure we have the most optimal allocation.
*/
- struct x11_swapchain *old_chain = (void *)(intptr_t) pCreateInfo->oldSwapchain;
+ WSI_FROM_HANDLE(x11_swapchain, old_chain, pCreateInfo->oldSwapchain);
if (old_chain)
chain->last_present_mode = old_chain->last_present_mode;
else