spec: handle nullptr vkGetInstanceProcAddr

This commit is contained in:
Danny Robson 2019-03-03 16:49:31 +11:00
parent 3d6c0f71f7
commit 1496e7a340

View File

@ -880,6 +880,18 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
return err; return err;
""", """,
'vkGetInstanceProcAddr': """
if (instance == VK_NULL_HANDLE) {
return (PFN_vkVoidFunction)cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (instance, pName);
}
auto const entry = reinterpret_cast<indirect<VkInstance,cruft::vk::load::instance_table> const*> (instance);
return (entry->table.vkGetInstanceProcAddr)(
entry->handle, pName
);
""",
'vkCreateDevice': """ 'vkCreateDevice': """
(void)physicalDevice; (void)physicalDevice;
(void)pCreateInfo; (void)pCreateInfo;