tools/spec: use the correct handle for EnumeratePhysicalDevice
This commit is contained in:
parent
253d5414da
commit
92a43a10cb
@ -921,10 +921,19 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
|
||||
auto wrapped = std::make_unique<indirect<VkPhysicalDevice,cruft::vk::load::instance_table>> ();
|
||||
wrapped->handle = res[i];
|
||||
|
||||
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (entry->table.vkGetInstanceProcAddr (instance, #NAME));
|
||||
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (entry->table.vkGetInstanceProcAddr (entry->handle, #NAME));
|
||||
MAP_INSTANCE_COMMANDS(GET)
|
||||
#undef GET
|
||||
|
||||
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (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<decltype(&NAME)> (cruft::vk::load::v_table->vk_icdGetPhysicalDeviceProcAddr (entry->handle, #NAME));
|
||||
MAP_INSTANCE_COMMANDS(GET)
|
||||
#undef GET
|
||||
|
||||
std::clog << "physical_device[" << i << "]; wrapped: " << wrapped.get() << ", native: " << (void*)wrapped->handle << '\\n';
|
||||
pPhysicalDevices[i] = (VkPhysicalDevice)wrapped.release ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user