aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.h
diff options
context:
space:
mode:
authorPiers Daniell <pdaniell@nvidia.com>2016-03-31 14:47:57 -0600
committerJon Ashburn <jon@lunarg.com>2016-04-01 11:23:18 -0600
commitc267cd99847863b77d83e1b82bdb3b3d37fe7b2c (patch)
tree2f070c50f060cfa7e21e0f4b3fdfbedb5e5dad29 /loader/loader.h
parentfff87f6cca6918c85f14c97d5f912f4b28013ce2 (diff)
downloadusermoji-c267cd99847863b77d83e1b82bdb3b3d37fe7b2c.tar.xz
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
Diffstat (limited to 'loader/loader.h')
-rw-r--r--loader/loader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/loader/loader.h b/loader/loader.h
index 20453d38..2c3240eb 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;
}