From 114e9608100c1d2979610dae180d57894161d5ee Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 4 Mar 2019 10:51:12 +1100 Subject: [PATCH] tools/spec: prefer PhysicalDeviceGetProcAddr --- tools/spec.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/spec.py b/tools/spec.py index d592287..766e278 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -884,6 +884,7 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): """, 'vkGetInstanceProcAddr': """ + std::clog << "InstanceProcAddr: " << pName << '\\n'; #define ATTEMPT(NAME) if (!strcmp (#NAME, pName)) return reinterpret_cast (&NAME); MAP_INSTANCE_COMMANDS(ATTEMPT) #undef ATTEMPT @@ -922,15 +923,15 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): auto wrapped = std::make_unique> (); wrapped->handle = res[i]; - #define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast (entry->table.vkGetInstanceProcAddr (entry->handle, #NAME)); - MAP_INSTANCE_COMMANDS(GET) - #undef GET + //#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast (cruft::vk::load::v_table->vk_icdGetPhysicalDeviceProcAddr (entry->handle, #NAME)); + //MAP_INSTANCE_COMMANDS(GET) + //#undef GET #define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast (cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (entry->handle, #NAME)); MAP_INSTANCE_COMMANDS(GET) #undef GET - #define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast (cruft::vk::load::v_table->vk_icdGetPhysicalDeviceProcAddr (entry->handle, #NAME)); + #define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast (entry->table.vkGetInstanceProcAddr (entry->handle, #NAME)); MAP_INSTANCE_COMMANDS(GET) #undef GET