From c267cd99847863b77d83e1b82bdb3b3d37fe7b2c Mon Sep 17 00:00:00 2001 From: Piers Daniell Date: Thu, 31 Mar 2016 14:47:57 -0600 Subject: [PATCH] loader: Fix loader_unwrap_physical_device() to cast to correct type The trampoline loader_unwrap_physical_device() utility function was casting the VkPhysicalDevice parameter to (loader_physical_device*) instead of (loader_physical_device_tramp*). It worked previously because it just so happened that the phys_dev member was in the same location in both structs. Change-Id: I3bee175df8b64b44ef2e440f7e43603ca0617da2 --- loader/loader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/loader.h b/loader/loader.h index 20453d3..2c3240e 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -376,8 +376,8 @@ static inline struct loader_instance *loader_instance(VkInstance instance) { static inline VkPhysicalDevice loader_unwrap_physical_device(VkPhysicalDevice physicalDevice) { - struct loader_physical_device *phys_dev = - (struct loader_physical_device *)physicalDevice; + struct loader_physical_device_tramp *phys_dev = + (struct loader_physical_device_tramp *)physicalDevice; return phys_dev->phys_dev; } -- 2.7.4