diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-29 15:39:26 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 17:53:20 -0600 |
| commit | be10336228bfabe276ba61adf9d6092971d3bdb7 (patch) | |
| tree | f755f71a6f68cbbdd7b0984c3e0342bcfbacce60 /loader/debug_report.c | |
| parent | e291354abe5eff9de35075020c7bbc00d4d7cf0e (diff) | |
| download | usermoji-be10336228bfabe276ba61adf9d6092971d3bdb7.tar.xz | |
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.
Diffstat (limited to 'loader/debug_report.c')
| -rw-r--r-- | loader/debug_report.c | 20 |
1 files changed, 12 insertions, 8 deletions
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( |
