diff options
| author | Jon Ashburn <jon@lunarg.com> | 2016-03-28 13:58:16 -0600 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-04-01 09:43:15 -0600 |
| commit | b16e5173a411e3a9c164b8a00273da372c9bdf33 (patch) | |
| tree | d2f9ded33898d2e25bd82fca93794268fecfae4e /loader/loader.c | |
| parent | ee075aba2f1f920f38d58a5ddb0383c92eab96d9 (diff) | |
| download | usermoji-b16e5173a411e3a9c164b8a00273da372c9bdf33.tar.xz | |
loader: Remove the instance_info in the layer chain structure
Simplifies code, the loader instance structure is already passed down
from trampoline code to terminator code via the pInstance parameter. It doesn't
need to be added to this pCreatInfo pNext list structure.
Layers which modifiy pInstance whould do it on the way up the chain not going
down the chain.
Change-Id: I59581b94871c094995787808cf5ae2955ad0191a
Diffstat (limited to 'loader/loader.c')
| -rw-r--r-- | loader/loader.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/loader/loader.c b/loader/loader.c index 7f1002b4..5a00b6f2 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -3267,19 +3267,6 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, PFN_vkCreateInstance fpCreateInstance = (PFN_vkCreateInstance)nextGIPA(*created_instance, "vkCreateInstance"); if (fpCreateInstance) { - VkLayerInstanceCreateInfo instance_create_info; - - instance_create_info.sType = - VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO; - instance_create_info.function = VK_LAYER_INSTANCE_INFO; - - instance_create_info.u.instanceInfo.instance_info = inst; - instance_create_info.u.instanceInfo.pfnNextGetInstanceProcAddr = - nextGIPA; - - instance_create_info.pNext = loader_create_info.pNext; - loader_create_info.pNext = &instance_create_info; - res = fpCreateInstance(&loader_create_info, pAllocator, created_instance); } else { @@ -3622,18 +3609,7 @@ terminator_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, VkResult res = VK_SUCCESS; bool success = false; - VkLayerInstanceCreateInfo *chain_info = - (VkLayerInstanceCreateInfo *)pCreateInfo->pNext; - while ( - chain_info && - !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && - chain_info->function == VK_LAYER_INSTANCE_INFO)) { - chain_info = (VkLayerInstanceCreateInfo *)chain_info->pNext; - } - assert(chain_info != NULL); - - struct loader_instance *ptr_instance = - (struct loader_instance *)chain_info->u.instanceInfo.instance_info; + struct loader_instance *ptr_instance = (struct loader_instance *) *pInstance; memcpy(&icd_create_info, pCreateInfo, sizeof(icd_create_info)); icd_create_info.enabledLayerCount = 0; |
