From 1496e7a340da9167df464d260f24f1982fadda76 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 3 Mar 2019 16:49:31 +1100 Subject: [PATCH] spec: handle nullptr vkGetInstanceProcAddr --- tools/spec.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/spec.py b/tools/spec.py index fd5b1f0..ac04e65 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -880,6 +880,18 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): 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 const*> (instance); + + return (entry->table.vkGetInstanceProcAddr)( + entry->handle, pName + ); + """, + 'vkCreateDevice': """ (void)physicalDevice; (void)pCreateInfo;