Test Wrap Layer didn't unwrap in vkGetInstanceProcAddr
authorCharles Giessen <charles@lunarg.com>
Mon, 31 Oct 2022 22:38:45 +0000 (16:38 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 31 Oct 2022 23:19:23 +0000 (17:19 -0600)
Wrapping layer should be unwrapping the instance handle inside of GetProcAddr
functions.

tests/framework/layer/wrap_objects.cpp

index f2ed84a7178b290da5d8281c0d62058f521504ad..ae9ab43bd528990fa847be98af8a31fb2a6af6cd 100644 (file)
@@ -670,7 +670,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL wrap_vkGetInstanceProcAddr(VkInstance i
     VkLayerInstanceDispatchTable *pTable = &inst->layer_disp;
 
     if (pTable->GetInstanceProcAddr == NULL) return NULL;
-    return pTable->GetInstanceProcAddr(instance, funcName);
+    return pTable->GetInstanceProcAddr(inst->obj, funcName);
 }
 
 VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) {
@@ -681,7 +681,7 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance in
     VkLayerInstanceDispatchTable *pTable = &inst->layer_disp;
 
     if (pTable->GetPhysicalDeviceProcAddr == NULL) return NULL;
-    return pTable->GetPhysicalDeviceProcAddr(instance, funcName);
+    return pTable->GetPhysicalDeviceProcAddr(inst->obj, funcName);
 }
 
 }  // namespace wrap_objects