diff options
| author | Jon Ashburn <jon@lunarg.com> | 2015-05-21 17:42:17 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-17 19:47:02 -0600 |
| commit | 18495c0e7338cc1b782974d6da47f2a1bb0da2a1 (patch) | |
| tree | 1a6e019fd945eb2bb519ac4bd3c6f28910d7c3a4 | |
| parent | 6d878d1eabdf322997e23a8a10dbcaf4cbe4a260 (diff) | |
| download | usermoji-18495c0e7338cc1b782974d6da47f2a1bb0da2a1.tar.xz | |
loader: Fix for CreateInstance object created being pointer to pointer to disp
| -rw-r--r-- | loader/loader.c | 4 | ||||
| -rw-r--r-- | loader/trampoline.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/loader/loader.c b/loader/loader.c index 60641004..0d114a48 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1192,7 +1192,7 @@ VkResult loader_CreateInstance( const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance) { - struct loader_instance *ptr_instance = (struct loader_instance *) pInstance; + struct loader_instance *ptr_instance = *(struct loader_instance **) pInstance; struct loader_scanned_icds *scanned_icds; struct loader_icd *icd; VkResult res; @@ -1723,4 +1723,4 @@ VkResult loader_GetDisplayInfoWSI( res = icd->GetDisplayInfoWSI(display, infoType, pDataSize, pData); return res; -}
\ No newline at end of file +} diff --git a/loader/trampoline.c b/loader/trampoline.c index 7453f1ba..20fbe35c 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -78,9 +78,10 @@ LOADER_EXPORT VkResult VKAPI vkCreateInstance( loader.instances = ptr_instance; loader_activate_instance_layers(ptr_instance); - res = instance_disp.CreateInstance(pCreateInfo, (VkInstance *) ptr_instance); - *pInstance = (VkInstance) ptr_instance; + + res = ptr_instance->disp->CreateInstance(pCreateInfo, pInstance); + return res; } |
