From be10336228bfabe276ba61adf9d6092971d3bdb7 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Mon, 29 Jun 2015 15:39:26 -0600 Subject: loader: bug 12992: extension and layer support Much of layers and loader updated to work with final extension and layer mechanism. Not everything is working here. --- loader/debug_report.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'loader/debug_report.c') diff --git a/loader/debug_report.c b/loader/debug_report.c index 757ad3ff..2ad0782e 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -40,10 +40,9 @@ typedef void (VKAPI *PFN_stringCallback)(char *message); static const struct loader_extension_property debug_report_extension_info = { .info = { - .sType = VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES, - .name = DEBUG_REPORT_EXTENSION_NAME, + .extName = DEBUG_REPORT_EXTENSION_NAME, .version = VK_DEBUG_REPORT_EXTENSION_VERSION, - .description = "loader: debug report extension", + .specVersion = VK_API_VERSION, }, .origin = VK_EXTENSION_ORIGIN_LOADER, }; @@ -55,12 +54,17 @@ void debug_report_add_instance_extensions( } void debug_report_create_instance( - struct loader_instance *ptr_instance) + struct loader_instance *ptr_instance, + const VkInstanceCreateInfo *pCreateInfo) { - ptr_instance->debug_report_enabled = has_vk_extension_property_array( - &debug_report_extension_info.info, - ptr_instance->app_extension_count, - ptr_instance->app_extension_props); + ptr_instance->debug_report_enabled = false; + + for (uint32_t i = 0; i < pCreateInfo->extensionCount; i++) { + if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], DEBUG_REPORT_EXTENSION_NAME) == 0) { + ptr_instance->debug_report_enabled = true; + return; + } + } } static VkResult debug_report_DbgCreateMsgCallback( -- cgit v1.2.3