From 0f060df145d1a612dfa4c07c16d3aeada75d46f3 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 9 Dec 2015 15:48:16 -0700 Subject: debug_report: rename object type and error bits Conflicts: demos/tri.c layers/device_limits.cpp layers/draw_state.cpp layers/image.cpp layers/mem_tracker.cpp layers/param_checker.cpp layers/vk_layer_logging.h loader/debug_report.c tests/layer_validation_tests.cpp --- loader/debug_report.c | 72 ++++++++++++------------ loader/debug_report.h | 24 ++++---- loader/loader.c | 148 +++++++++++++++++++++++++------------------------- loader/loader.h | 12 ++-- loader/table_ops.h | 18 +++--- loader/trampoline.c | 6 +- 6 files changed, 140 insertions(+), 140 deletions(-) (limited to 'loader') diff --git a/loader/debug_report.c b/loader/debug_report.c index 5d3ca116..ebb1ae29 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -41,8 +41,8 @@ typedef void (VKAPI_PTR *PFN_stringCallback)(char *message); static const VkExtensionProperties debug_report_extension_info = { - .extensionName = VK_EXT_LUNARG_DEBUG_REPORT_EXTENSION_NAME, - .specVersion = VK_EXT_LUNARG_DEBUG_REPORT_EXTENSION_REVISION, + .extensionName = VK_EXT_DEBUG_REPORT_EXTENSION_NAME, + .specVersion = VK_EXT_DEBUG_REPORT_REVISION, }; void debug_report_add_instance_extensions( @@ -59,7 +59,7 @@ void debug_report_create_instance( ptr_instance->debug_report_enabled = false; for (uint32_t i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) { - if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_LUNARG_DEBUG_REPORT_EXTENSION_NAME) == 0) { + if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == 0) { ptr_instance->debug_report_enabled = true; return; } @@ -68,9 +68,9 @@ void debug_report_create_instance( VkResult util_CreateDebugReportCallback( struct loader_instance *inst, - VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, + VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, - VkDebugReportCallbackLUNARG callback) + VkDebugReportCallbackEXT callback) { VkLayerDbgFunctionNode *pNewDbgFuncNode; if (pAllocator != NULL) { @@ -93,13 +93,13 @@ VkResult util_CreateDebugReportCallback( static VKAPI_ATTR VkResult VKAPI_CALL debug_report_CreateDebugReportCallback( VkInstance instance, - VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, + VkDebugReportCallbackCreateInfoEXT *pCreateInfo, VkAllocationCallbacks *pAllocator, - VkDebugReportCallbackLUNARG* pCallback) + VkDebugReportCallbackEXT* pCallback) { struct loader_instance *inst = loader_get_instance(instance); loader_platform_thread_lock_mutex(&loader_lock); - VkResult result = inst->disp->CreateDebugReportCallbackLUNARG(instance, pCreateInfo, pAllocator, pCallback); + VkResult result = inst->disp->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); if (result == VK_SUCCESS) { result = util_CreateDebugReportCallback(inst, pCreateInfo, pAllocator, *pCallback); } @@ -111,7 +111,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL debug_report_CreateDebugReportCallback( VkBool32 util_DebugReportMessage( const struct loader_instance* inst, VkFlags msgFlags, - VkDebugReportObjectTypeLUNARG objectType, + VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode, @@ -140,7 +140,7 @@ VkBool32 util_DebugReportMessage( void util_DestroyDebugReportCallback( struct loader_instance *inst, - VkDebugReportCallbackLUNARG callback, + VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) { VkLayerDbgFunctionNode *pTrav = inst->DbgFunctionHead; @@ -165,13 +165,13 @@ void util_DestroyDebugReportCallback( static VKAPI_ATTR void VKAPI_CALL debug_report_DestroyDebugReportCallback( VkInstance instance, - VkDebugReportCallbackLUNARG callback, + VkDebugReportCallbackEXT callback, VkAllocationCallbacks *pAllocator) { struct loader_instance *inst = loader_get_instance(instance); loader_platform_thread_lock_mutex(&loader_lock); - inst->disp->DestroyDebugReportCallbackLUNARG(instance, callback, pAllocator); + inst->disp->DestroyDebugReportCallbackEXT(instance, callback, pAllocator); util_DestroyDebugReportCallback(inst, callback, pAllocator); @@ -180,8 +180,8 @@ static VKAPI_ATTR void VKAPI_CALL debug_report_DestroyDebugReportCallback( static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessage( VkInstance instance, - VkDebugReportFlagsLUNARG flags, - VkDebugReportObjectTypeLUNARG objType, + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, @@ -190,7 +190,7 @@ static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessage( { struct loader_instance *inst = loader_get_instance(instance); - inst->disp->DebugReportMessageLUNARG(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); + inst->disp->DebugReportMessageEXT(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } @@ -200,29 +200,29 @@ static VKAPI_ATTR void VKAPI_CALL debug_report_DebugReportMessage( */ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( - VkInstance instance, - VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, - const VkAllocationCallbacks *pAllocator, - VkDebugReportCallbackLUNARG *pCallback) + VkInstance instance, + const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkDebugReportCallbackEXT *pCallback) { - VkDebugReportCallbackLUNARG *icd_info; + VkDebugReportCallbackEXT *icd_info; const struct loader_icd *icd; struct loader_instance *inst = (struct loader_instance *) instance; VkResult res; uint32_t storage_idx; - icd_info = calloc(sizeof(VkDebugReportCallbackLUNARG), inst->total_icd_count); + icd_info = calloc(sizeof(VkDebugReportCallbackEXT), inst->total_icd_count); if (!icd_info) { return VK_ERROR_OUT_OF_HOST_MEMORY; } storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { - if (!icd->CreateDebugReportCallbackLUNARG) { + if (!icd->CreateDebugReportCallbackEXT) { continue; } - res = icd->CreateDebugReportCallbackLUNARG( + res = icd->CreateDebugReportCallbackEXT( icd->instance, pCreateInfo, pAllocator, @@ -239,7 +239,7 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { if (icd_info[storage_idx]) { - icd->DestroyDebugReportCallbackLUNARG( + icd->DestroyDebugReportCallbackEXT( icd->instance, icd_info[storage_idx], pAllocator); @@ -250,7 +250,7 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( return res; } - *(VkDebugReportCallbackLUNARG **)pCallback = icd_info; + *(VkDebugReportCallbackEXT **)pCallback = icd_info; return VK_SUCCESS; } @@ -260,18 +260,18 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( * for DestroyDebugReportCallback */ VKAPI_ATTR void loader_DestroyDebugReportCallback(VkInstance instance, - VkDebugReportCallbackLUNARG callback, const VkAllocationCallbacks *pAllocator) + VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator) { uint32_t storage_idx; - VkDebugReportCallbackLUNARG *icd_info; + VkDebugReportCallbackEXT *icd_info; const struct loader_icd *icd; struct loader_instance *inst = (struct loader_instance *) instance; - icd_info = *(VkDebugReportCallbackLUNARG **) &callback; + icd_info = *(VkDebugReportCallbackEXT **) &callback; storage_idx = 0; for (icd = inst->icds; icd; icd = icd->next) { if (icd_info[storage_idx]) { - icd->DestroyDebugReportCallbackLUNARG( + icd->DestroyDebugReportCallbackEXT( icd->instance, icd_info[storage_idx], pAllocator); @@ -287,8 +287,8 @@ VKAPI_ATTR void loader_DestroyDebugReportCallback(VkInstance instance, */ VKAPI_ATTR void VKAPI_CALL loader_DebugReportMessage( VkInstance instance, - VkDebugReportFlagsLUNARG flags, - VkDebugReportObjectTypeLUNARG objType, + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, @@ -302,8 +302,8 @@ VKAPI_ATTR void VKAPI_CALL loader_DebugReportMessage( loader_platform_thread_lock_mutex(&loader_lock); for (icd = inst->icds; icd; icd = icd->next) { - if (icd->DebugReportMessageLUNARG != NULL) { - icd->DebugReportMessageLUNARG(icd->instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); + if (icd->DebugReportMessageEXT != NULL) { + icd->DebugReportMessageEXT(icd->instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg); } } @@ -326,15 +326,15 @@ bool debug_report_instance_gpa( // so always return the entry points if name matches and it's enabled *addr = NULL; - if (!strcmp("vkCreateDebugReportCallbackLUNARG", name)) { + if (!strcmp("vkCreateDebugReportCallbackEXT", name)) { *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_CreateDebugReportCallback : NULL; return true; } - if (!strcmp("vkDestroyDebugReportCallbackLUNARG", name)) { + if (!strcmp("vkDestroyDebugReportCallbackEXT", name)) { *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_DestroyDebugReportCallback : NULL; return true; } - if (!strcmp("vkDebugReportMessageLUNARG", name)) { + if (!strcmp("vkDebugReportMessageEXT", name)) { *addr = ptr_instance->debug_report_enabled ? (void *) debug_report_DebugReportMessage : NULL; return true; } diff --git a/loader/debug_report.h b/loader/debug_report.h index baaae86f..a314fb16 100644 --- a/loader/debug_report.h +++ b/loader/debug_report.h @@ -28,7 +28,7 @@ #include "vk_loader_platform.h" #include "loader.h" -#include "vulkan/vk_lunarg_debug_report.h" +#include "vulkan/vk_ext_debug_report.h" /* * CreateMsgCallback is global and needs to be * applied to all layers and ICDs. @@ -104,20 +104,20 @@ bool debug_report_instance_gpa( void **addr); VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDebugReportCallback( - VkInstance instance, - VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, - const VkAllocationCallbacks *pAllocator, - VkDebugReportCallbackLUNARG *pCallback); + VkInstance instance, + const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkDebugReportCallbackEXT *pCallback); VKAPI_ATTR void VKAPI_CALL loader_DestroyDebugReportCallback( VkInstance instance, - VkDebugReportCallbackLUNARG callback, + VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator); VKAPI_ATTR void VKAPI_CALL loader_DebugReportMessage( VkInstance instance, - VkDebugReportFlagsLUNARG flags, - VkDebugReportObjectTypeLUNARG objType, + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location, int32_t msgCode, @@ -126,19 +126,19 @@ VKAPI_ATTR void VKAPI_CALL loader_DebugReportMessage( VkResult util_CreateDebugReportCallback( struct loader_instance *inst, - VkDebugReportCallbackCreateInfoLUNARG *pCreateInfo, + VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, - VkDebugReportCallbackLUNARG callback); + VkDebugReportCallbackEXT callback); void util_DestroyDebugReportCallback( struct loader_instance *inst, - VkDebugReportCallbackLUNARG callback, + VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator); VkBool32 util_DebugReportMessage( const struct loader_instance* inst, VkFlags msgFlags, - VkDebugReportObjectTypeLUNARG objectType, + VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode, diff --git a/loader/loader.c b/loader/loader.c index e3609b85..3f71cde8 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -115,9 +115,9 @@ const VkLayerInstanceDispatchTable instance_disp = { .GetPhysicalDeviceSurfaceCapabilitiesKHR = loader_GetPhysicalDeviceSurfaceCapabilitiesKHR, .GetPhysicalDeviceSurfaceFormatsKHR = loader_GetPhysicalDeviceSurfaceFormatsKHR, .GetPhysicalDeviceSurfacePresentModesKHR = loader_GetPhysicalDeviceSurfacePresentModesKHR, - .CreateDebugReportCallbackLUNARG = loader_CreateDebugReportCallback, - .DestroyDebugReportCallbackLUNARG = loader_DestroyDebugReportCallback, - .DebugReportMessageLUNARG = loader_DebugReportMessage, + .CreateDebugReportCallbackEXT = loader_CreateDebugReportCallback, + .DestroyDebugReportCallbackEXT = loader_DestroyDebugReportCallback, + .DebugReportMessageEXT = loader_DebugReportMessage, #ifdef VK_USE_PLATFORM_MIR_KHR .CreateMirSurfaceKHR = loader_CreateMirSurfaceKHR, .GetPhysicalDeviceMirPresentationSupportKHR = loader_GetPhysicalDeviceMirPresentationSupportKHR, @@ -222,7 +222,7 @@ static void loader_log(const struct loader_instance *inst, VkFlags msg_type, int va_end(ap); if (inst) { - util_DebugReportMessage(inst, msg_type, VK_OBJECT_TYPE_INSTANCE, (uint64_t) inst, 0, msg_code, "loader", msg); + util_DebugReportMessage(inst, msg_type, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, (uint64_t) inst, 0, msg_code, "loader", msg); } if (!(msg_type & g_loader_log_msgs)) { @@ -297,7 +297,7 @@ static char *loader_get_registry_files(const struct loader_instance *inst, char total_size *= 2; } if (out == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory, failed loader_get_registry_files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory, failed loader_get_registry_files"); return NULL; } if (strlen(out) == 0) @@ -473,7 +473,7 @@ static struct loader_layer_properties *loader_get_next_layer_property( sizeof(struct loader_layer_properties) * 64, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (layer_list->list == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't add any layer properties to list"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't add any layer properties to list"); return NULL; } memset(layer_list->list, 0, sizeof(struct loader_layer_properties) * 64); @@ -488,7 +488,7 @@ static struct loader_layer_properties *loader_get_next_layer_property( layer_list->capacity * 2, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (layer_list->list == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "realloc failed for layer list"); } layer_list->capacity *= 2; @@ -549,7 +549,7 @@ static void loader_add_instance_extensions( res = fp_get_props(NULL, &count, NULL); if (res != VK_SUCCESS) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Error getting Instance extension count from %s", lib_name); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Error getting Instance extension count from %s", lib_name); return; } @@ -562,7 +562,7 @@ static void loader_add_instance_extensions( res = fp_get_props(NULL, &count, ext_props); if (res != VK_SUCCESS) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Error getting Instance extensions from %s", lib_name); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Error getting Instance extensions from %s", lib_name); return; } @@ -573,7 +573,7 @@ static void loader_add_instance_extensions( VK_MAJOR(ext_props[i].specVersion), VK_MINOR(ext_props[i].specVersion), VK_PATCH(ext_props[i].specVersion)); - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Instance Extension: %s (%s) version %s", ext_props[i].extensionName, lib_name, spec_version); loader_add_to_ext_list(inst, ext_list, 1, &ext_props[i]); @@ -608,7 +608,7 @@ static VkResult loader_init_device_extensions( VK_MAJOR(ext_props[i].specVersion), VK_MINOR(ext_props[i].specVersion), VK_PATCH(ext_props[i].specVersion)); - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Device Extension: %s (%s) version %s", ext_props[i].extensionName, phys_dev->this_icd->this_icd_lib->lib_name, spec_version); res = loader_add_to_ext_list(inst, ext_list, 1, &ext_props[i]); @@ -644,7 +644,7 @@ static VkResult loader_add_device_extensions( VK_MAJOR(ext_props[i].specVersion), VK_MINOR(ext_props[i].specVersion), VK_PATCH(ext_props[i].specVersion)); - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Device Extension: %s (%s) version %s", ext_props[i].extensionName, lib_name, spec_version); res = loader_add_to_ext_list(inst, ext_list, 1, &ext_props[i]); @@ -652,7 +652,7 @@ static VkResult loader_add_device_extensions( return res; } } else { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Error getting physical device extension info count from library %s", lib_name); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Error getting physical device extension info count from library %s", lib_name); return res; } @@ -815,7 +815,7 @@ static VkResult loader_add_layer_names_to_list( const char *search_target = names[i]; layer_prop = loader_get_layer_property(search_target, search_list); if (!layer_prop) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Unable to find layer %s", search_target); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Unable to find layer %s", search_target); err = VK_ERROR_LAYER_NOT_PRESENT; continue; } @@ -1026,7 +1026,7 @@ static void loader_find_layer_name_add_list( } } if (!found) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Warning, couldn't find layer name %s to activate", name); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Warning, couldn't find layer name %s to activate", name); } } @@ -1076,7 +1076,7 @@ void loader_get_icd_loader_instance_extensions( struct loader_extension_list *inst_exts) { struct loader_extension_list icd_exts; - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, "Build ICD instance extension list"); + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Build ICD instance extension list"); // traverse scanned icd list adding non-duplicate extensions to the list for (uint32_t i = 0; i < icd_libs->count; i++) { loader_init_generic_list(inst, (struct loader_generic_list *) &icd_exts, @@ -1145,7 +1145,7 @@ static struct loader_device *loader_add_logical_device( new_dev = loader_heap_alloc(inst, sizeof(struct loader_device), VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); if (!new_dev) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to alloc struct laoder-device"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to alloc struct laoder-device"); return NULL; } @@ -1272,14 +1272,14 @@ static void loader_scanned_icd_add( // Used to call: dlopen(filename, RTLD_LAZY); handle = loader_platform_open_library(filename); if (!handle) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, loader_platform_open_library_error(filename)); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, loader_platform_open_library_error(filename)); return; } #define LOOKUP_LD(func_ptr, func) do { \ func_ptr = (PFN_vk ##func) loader_platform_get_proc_address(handle, "vk" #func); \ if (!func_ptr) { \ - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, loader_platform_get_proc_address_error("vk" #func)); \ + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, loader_platform_get_proc_address_error("vk" #func)); \ return; \ } \ } while (0) @@ -1313,7 +1313,7 @@ static void loader_scanned_icd_add( strlen(filename) + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!new_node->lib_name) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Out of memory can't add icd"); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Out of memory can't add icd"); return; } strcpy(new_node->lib_name, filename); @@ -1329,7 +1329,7 @@ static bool loader_icd_init_entrys(struct loader_icd *icd, #define LOOKUP_GIPA(func, required) do { \ icd->func = (PFN_vk ##func) fp_gipa(inst, "vk" #func); \ if (!icd->func && required) { \ - loader_log((struct loader_instance *) inst, VK_DEBUG_REPORT_WARN_BIT, 0, \ + loader_log((struct loader_instance *) inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, \ loader_platform_get_proc_address_error("vk" #func)); \ return false; \ } \ @@ -1347,8 +1347,8 @@ static bool loader_icd_init_entrys(struct loader_icd *icd, LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyProperties, true); LOOKUP_GIPA(EnumerateDeviceExtensionProperties, true); LOOKUP_GIPA(GetPhysicalDeviceSparseImageFormatProperties, true); - LOOKUP_GIPA(CreateDebugReportCallbackLUNARG, false); - LOOKUP_GIPA(DestroyDebugReportCallbackLUNARG, false); + LOOKUP_GIPA(CreateDebugReportCallbackEXT, false); + LOOKUP_GIPA(DestroyDebugReportCallbackEXT, false); LOOKUP_GIPA(GetPhysicalDeviceSurfaceSupportKHR, false); LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilitiesKHR, false); LOOKUP_GIPA(GetPhysicalDeviceSurfaceFormatsKHR, false); @@ -1391,19 +1391,19 @@ static void loader_debug_init(void) g_loader_log_msgs = ~0u; } else if (strncmp(env, "warn", len) == 0) { g_loader_debug |= LOADER_WARN_BIT; - g_loader_log_msgs |= VK_DEBUG_REPORT_WARN_BIT; + g_loader_log_msgs |= VK_DEBUG_REPORT_WARN_BIT_EXT; } else if (strncmp(env, "info", len) == 0) { g_loader_debug |= LOADER_INFO_BIT; - g_loader_log_msgs |= VK_DEBUG_REPORT_INFO_BIT; + g_loader_log_msgs |= VK_DEBUG_REPORT_INFO_BIT_EXT; } else if (strncmp(env, "perf", len) == 0) { g_loader_debug |= LOADER_PERF_BIT; - g_loader_log_msgs |= VK_DEBUG_REPORT_PERF_WARN_BIT; + g_loader_log_msgs |= VK_DEBUG_REPORT_PERF_WARN_BIT_EXT; } else if (strncmp(env, "error", len) == 0) { g_loader_debug |= LOADER_ERROR_BIT; - g_loader_log_msgs |= VK_DEBUG_REPORT_ERROR_BIT; + g_loader_log_msgs |= VK_DEBUG_REPORT_ERROR_BIT_EXT; } else if (strncmp(env, "debug", len) == 0) { g_loader_debug |= LOADER_DEBUG_BIT; - g_loader_log_msgs |= VK_DEBUG_REPORT_DEBUG_BIT; + g_loader_log_msgs |= VK_DEBUG_REPORT_DEBUG_BIT_EXT; } } @@ -1533,7 +1533,7 @@ static cJSON *loader_get_json(const struct loader_instance *inst, const char *fi uint64_t len; file = fopen(filename,"rb"); if (!file) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Couldn't open JSON file %s", filename); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Couldn't open JSON file %s", filename); return NULL; } fseek(file, 0, SEEK_END); @@ -1541,12 +1541,12 @@ static cJSON *loader_get_json(const struct loader_instance *inst, const char *fi fseek(file, 0, SEEK_SET); json_buf = (char*) loader_stack_alloc(len+1); if (json_buf == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't get JSON file"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't get JSON file"); fclose(file); return NULL; } if (fread(json_buf, sizeof(char), len, file) != len) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "fread failed can't get JSON file"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "fread failed can't get JSON file"); fclose(file); return NULL; } @@ -1556,7 +1556,7 @@ static cJSON *loader_get_json(const struct loader_instance *inst, const char *fi //parse text from file json = cJSON_Parse(json_buf); if (json == NULL) - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Can't parse JSON file %s", filename); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Can't parse JSON file %s", filename); return json; } @@ -1651,15 +1651,15 @@ static void loader_add_layer_properties(const struct loader_instance *inst, return; } char *file_vers = cJSON_PrintUnformatted(item); - loader_log(inst, VK_DEBUG_REPORT_INFO_BIT, 0, "Found manifest file %s, version %s", + loader_log(inst, VK_DEBUG_REPORT_INFO_BIT_EXT, 0, "Found manifest file %s, version %s", filename, file_vers); if (strcmp(file_vers, "\"1.0.0\"") != 0) - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Unexpected manifest file version (expected 1.0.0), may cause errors"); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Unexpected manifest file version (expected 1.0.0), may cause errors"); loader_tls_heap_free(file_vers); layer_node = cJSON_GetObjectItem(json, "layer"); if (layer_node == NULL) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Can't find \"layer\" object in manifest JSON file, skipping"); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Can't find \"layer\" object in manifest JSON file, skipping"); return; } @@ -1942,7 +1942,7 @@ static void loader_get_manifest_files(const struct loader_instance *inst, } if (location == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Can't get manifest files with NULL location, env_override=%s", env_override); return; @@ -1958,14 +1958,14 @@ static void loader_get_manifest_files(const struct loader_instance *inst, if (override == NULL) { loc = loader_stack_alloc(strlen(location) + 1); if (loc == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't get manifest files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't get manifest files"); return; } strcpy(loc, location); #if defined(_WIN32) loc = loader_get_registry_files(inst, loc); if (loc == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Registry lookup failed can't get manifest files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Registry lookup failed can't get manifest files"); return; } #endif @@ -1973,14 +1973,14 @@ static void loader_get_manifest_files(const struct loader_instance *inst, else { loc = loader_stack_alloc(strlen(override) + 1); if (loc == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't get manifest files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't get manifest files"); return; } strcpy(loc, override); } // Print out the paths being searched if debugging is enabled - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, "Searching the following paths for manifest files: %s\n", loc); + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Searching the following paths for manifest files: %s\n", loc); file = loc; while (*file) { @@ -2006,7 +2006,7 @@ static void loader_get_manifest_files(const struct loader_instance *inst, // make a copy of location so it isn't modified dir = loader_stack_alloc(strlen(loc) + 1); if (dir == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't get manifest files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't get manifest files"); return; } strcpy(dir, loc); @@ -2035,7 +2035,7 @@ static void loader_get_manifest_files(const struct loader_instance *inst, alloced_count *= 2; } if (out_files->filename_list == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't alloc manifest file list"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't alloc manifest file list"); return; } out_files->filename_list[out_files->count] = loader_heap_alloc( @@ -2043,13 +2043,13 @@ static void loader_get_manifest_files(const struct loader_instance *inst, strlen(name) + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); if (out_files->filename_list[out_files->count] == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Out of memory can't get manifest files"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Out of memory can't get manifest files"); return; } strcpy(out_files->filename_list[out_files->count], name); out_files->count++; } else if (!list_is_dirs) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Skipping manifest file %s, file name must end in .json", name); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Skipping manifest file %s, file name must end in .json", name); } if (list_is_dirs) { dent = readdir(sysdir); @@ -2120,10 +2120,10 @@ void loader_icd_scan( return; } char *file_vers = cJSON_Print(item); - loader_log(inst, VK_DEBUG_REPORT_INFO_BIT, 0, "Found manifest file %s, version %s", + loader_log(inst, VK_DEBUG_REPORT_INFO_BIT_EXT, 0, "Found manifest file %s, version %s", file_str, file_vers); if (strcmp(file_vers, "\"1.0.0\"") != 0) - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Unexpected manifest file version (expected 1.0.0), may cause errors"); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Unexpected manifest file version (expected 1.0.0), may cause errors"); loader_tls_heap_free(file_vers); itemICD = cJSON_GetObjectItem(json, "ICD"); if (itemICD != NULL) { @@ -2131,7 +2131,7 @@ void loader_icd_scan( if (item != NULL) { char *temp= cJSON_Print(item); if (!temp || strlen(temp) == 0) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Can't find \"library_path\" in ICD JSON file %s, skipping", file_str); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Can't find \"library_path\" in ICD JSON file %s, skipping", file_str); loader_tls_heap_free(temp); loader_heap_free(inst, file_str); cJSON_Delete(json); @@ -2143,14 +2143,14 @@ void loader_icd_scan( strcpy(library_path, &temp[1]); loader_tls_heap_free(temp); if (!library_path || strlen(library_path) == 0) { - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Can't find \"library_path\" in ICD JSON file %s, skipping", file_str); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Can't find \"library_path\" in ICD JSON file %s, skipping", file_str); loader_heap_free(inst, file_str); cJSON_Delete(json); continue; } char fullpath[MAX_STRING_SIZE]; // Print out the paths being searched if debugging is enabled - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, "Searching for ICD drivers named %s default dir %s\n", library_path, DEFAULT_VK_DRIVERS_PATH); + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Searching for ICD drivers named %s default dir %s\n", library_path, DEFAULT_VK_DRIVERS_PATH); if (loader_platform_is_path(library_path)) { // a relative or absolute path char *name_copy = loader_stack_alloc(strlen(file_str) + 1); @@ -2173,10 +2173,10 @@ void loader_icd_scan( loader_scanned_icd_add(inst, icds, fullpath, vers); } else - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Can't find \"library_path\" object in ICD JSON file %s, skipping", file_str); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Can't find \"library_path\" object in ICD JSON file %s, skipping", file_str); } else - loader_log(inst, VK_DEBUG_REPORT_WARN_BIT, 0, "Can't find \"ICD\" object in ICD JSON file %s, skipping", file_str); + loader_log(inst, VK_DEBUG_REPORT_WARN_BIT_EXT, 0, "Can't find \"ICD\" object in ICD JSON file %s, skipping", file_str); loader_heap_free(inst, file_str); cJSON_Delete(json); @@ -2210,7 +2210,7 @@ void loader_layer_scan( * used to check for global and physicaldevice layer properties. */ if (!loader_init_layer_library_list(&loader.scanned_layer_libraries)) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Alloc for layer list failed: %s line: %d", __FILE__, __LINE__); return; } @@ -2367,7 +2367,7 @@ static bool loader_add_dev_ext_table(struct loader_instance *inst, strlen(funcName) + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (inst->disp_hash[idx].func_name == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_add_dev_ext_table() can't allocate memory for func_name"); return false; } @@ -2380,7 +2380,7 @@ static bool loader_add_dev_ext_table(struct loader_instance *inst, list->index = loader_heap_alloc(inst, 8 * sizeof(*(list->index)), VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (list->index == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_add_dev_ext_table() can't allocate list memory"); return false; } @@ -2390,7 +2390,7 @@ static bool loader_add_dev_ext_table(struct loader_instance *inst, list->capacity * 2, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (list->index == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_add_dev_ext_table() can't reallocate list memory"); return false; } @@ -2406,7 +2406,7 @@ static bool loader_add_dev_ext_table(struct loader_instance *inst, strlen(funcName) + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (inst->disp_hash[i].func_name == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_add_dev_ext_table() can't rallocate func_name memory"); return false; } @@ -2419,7 +2419,7 @@ static bool loader_add_dev_ext_table(struct loader_instance *inst, i = (i + 1) % MAX_NUM_DEV_EXTS; } while (i != idx); - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_add_dev_ext_table() couldn't insert into hash table; is it full?"); return false; } @@ -2523,7 +2523,7 @@ static loader_platform_dl_handle loader_add_layer_lib( if (strcmp(loader.loaded_layer_lib_list[i].lib_name, layer_prop->lib_name) == 0) { /* Have already loaded this library, just increment ref count */ loader.loaded_layer_lib_list[i].ref_count++; - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "%s Chain: Increment layer reference count for layer library %s", chain_type, layer_prop->lib_name); return loader.loaded_layer_lib_list[i].lib_handle; @@ -2545,7 +2545,7 @@ static loader_platform_dl_handle loader_add_layer_lib( new_alloc_size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!new_layer_lib_list) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "loader: realloc failed in loader_add_layer_lib"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader: realloc failed in loader_add_layer_lib"); return NULL; } loader.loaded_layer_lib_capacity = new_alloc_size; @@ -2560,11 +2560,11 @@ static loader_platform_dl_handle loader_add_layer_lib( my_lib->lib_handle = NULL; if ((my_lib->lib_handle = loader_platform_open_library(my_lib->lib_name)) == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, loader_platform_open_library_error(my_lib->lib_name)); return NULL; } else { - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Chain: %s: Loading layer library %s", chain_type, layer_prop->lib_name); } @@ -2593,13 +2593,13 @@ static void loader_remove_layer_lib( if (my_lib) { my_lib->ref_count--; if (my_lib->ref_count > 0) { - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Decrement reference count for layer library %s", layer_prop->lib_name); return; } } loader_platform_close_library(my_lib->lib_handle); - loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "Unloading layer library %s", layer_prop->lib_name); /* Need to remove unused library from list */ @@ -2607,7 +2607,7 @@ static void loader_remove_layer_lib( loader.loaded_layer_lib_capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!new_layer_lib_list) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "loader: heap alloc failed loader_remove_layer_library"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader: heap alloc failed loader_remove_layer_library"); return; } @@ -2709,7 +2709,7 @@ VkResult loader_enable_instance_layers( assert(inst && "Cannot have null instance"); if (!loader_init_layer_list(inst, &inst->activated_layer_list)) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to alloc Instance activated layer list"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to alloc Instance activated layer list"); return VK_ERROR_OUT_OF_HOST_MEMORY; } @@ -2762,7 +2762,7 @@ uint32_t loader_activate_instance_layers(struct loader_instance *inst) wrappedInstance = loader_stack_alloc(sizeof(VkBaseLayerObject) * inst->activated_layer_list.count); if (!wrappedInstance) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to alloc Instance objects for layer"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to alloc Instance objects for layer"); return 0; } @@ -2802,14 +2802,14 @@ uint32_t loader_activate_instance_layers(struct loader_instance *inst) } else nextGPA = (PFN_vkGetInstanceProcAddr) loader_platform_get_proc_address(lib_handle, layer_prop->functions.str_gipa); if (!nextGPA) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to find vkGetInstanceProcAddr in layer %s", layer_prop->lib_name); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to find vkGetInstanceProcAddr in layer %s", layer_prop->lib_name); /* TODO: Should we return nextObj, nextGPA to previous? or decrement layer_list count*/ continue; } } - loader_log(inst, VK_DEBUG_REPORT_INFO_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_INFO_BIT_EXT, 0, "Insert instance layer %s (%s)", layer_prop->info.layerName, layer_prop->lib_name); @@ -2847,7 +2847,7 @@ static VkResult loader_enable_device_layers( } if (dev->activated_layer_list.list == NULL) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to alloc device activated layer list"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to alloc device activated layer list"); return VK_ERROR_OUT_OF_HOST_MEMORY; } @@ -2931,7 +2931,7 @@ static uint32_t loader_activate_device_layers( sizeof (VkBaseLayerObject) * dev->activated_layer_list.count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!wrappedGpus) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to alloc Gpu objects for layer"); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to alloc Gpu objects for layer"); return 0; } @@ -2954,12 +2954,12 @@ static uint32_t loader_activate_device_layers( } else nextGPA = (PFN_vkGetDeviceProcAddr) loader_platform_get_proc_address(lib_handle, layer_prop->functions.str_gdpa); if (!nextGPA) { - loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT, 0, "Failed to find vkGetDeviceProcAddr in layer %s", layer_prop->lib_name); + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "Failed to find vkGetDeviceProcAddr in layer %s", layer_prop->lib_name); continue; } } - loader_log(inst, VK_DEBUG_REPORT_INFO_BIT, 0, + loader_log(inst, VK_DEBUG_REPORT_INFO_BIT_EXT, 0, "Insert device layer library %s (%s)", layer_prop->info.layerName, layer_prop->lib_name); @@ -3084,7 +3084,7 @@ VkResult loader_validate_device_extensions( VKAPI_ATTR VkResult VKAPI_CALL loader_CreateInstance( const VkInstanceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, + const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) { struct loader_instance *ptr_instance = *(struct loader_instance **) pInstance; @@ -3140,7 +3140,7 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_CreateInstance( ptr_instance->icds = ptr_instance->icds->next; loader_icd_destroy(ptr_instance, icd); icd->instance = VK_NULL_HANDLE; - loader_log(ptr_instance, VK_DEBUG_REPORT_ERROR_BIT, 0, + loader_log(ptr_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "ICD ignored: failed to CreateInstance and find entrypoints with ICD"); } } diff --git a/loader/loader.h b/loader/loader.h index 057d12d1..69b6c4d5 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -189,9 +189,9 @@ struct loader_icd { PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties; - PFN_vkCreateDebugReportCallbackLUNARG CreateDebugReportCallbackLUNARG; - PFN_vkDestroyDebugReportCallbackLUNARG DestroyDebugReportCallbackLUNARG; - PFN_vkDebugReportMessageLUNARG DebugReportMessageLUNARG; + PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT; + PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT; + PFN_vkDebugReportMessageEXT DebugReportMessageEXT; PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR; @@ -343,8 +343,8 @@ extern loader_platform_thread_mutex loader_json_lock; extern const VkLayerInstanceDispatchTable instance_disp; struct loader_msg_callback_map_entry { - VkDebugReportCallbackLUNARG icd_obj; - VkDebugReportCallbackLUNARG loader_obj; + VkDebugReportCallbackEXT icd_obj; + VkDebugReportCallbackEXT loader_obj; }; bool compare_vk_extension_properties( diff --git a/loader/table_ops.h b/loader/table_ops.h index 50354960..1577409c 100644 --- a/loader/table_ops.h +++ b/loader/table_ops.h @@ -469,9 +469,9 @@ static inline void loader_init_instance_extension_dispatch_table( VkInstance inst) { table->DestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) gpa(inst, "vkDestroySurfaceKHR"); - table->CreateDebugReportCallbackLUNARG = (PFN_vkCreateDebugReportCallbackLUNARG) gpa(inst, "vkCreateDebugReportCallbackLUNARG"); - table->DestroyDebugReportCallbackLUNARG = (PFN_vkDestroyDebugReportCallbackLUNARG) gpa(inst, "vkDestroyDebugReportCallbackLUNARG"); - table->DebugReportMessageLUNARG = (PFN_vkDebugReportMessageLUNARG) gpa(inst, "vkDebugReportMessageLUNARG"); + table->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) gpa(inst, "vkCreateDebugReportCallbackEXT"); + table->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) gpa(inst, "vkDestroyDebugReportCallbackEXT"); + table->DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) gpa(inst, "vkDebugReportMessageEXT"); table->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(inst, "vkGetPhysicalDeviceSurfaceSupportKHR"); table->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); table->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(inst, "vkGetPhysicalDeviceSurfaceFormatsKHR"); @@ -572,12 +572,12 @@ static inline void *loader_lookup_instance_dispatch_table( if (!strcmp(name, "GetPhysicalDeviceXlibPresentationSupportKHR")) return (void *) table->GetPhysicalDeviceXlibPresentationSupportKHR; #endif - if (!strcmp(name, "CreateDebugReportCallbackLUNARG")) - return (void *) table->CreateDebugReportCallbackLUNARG; - if (!strcmp(name, "DestroyDebugReportCallbackLUNARG")) - return (void *) table->DestroyDebugReportCallbackLUNARG; - if (!strcmp(name, "DebugReportMessageLUNARG")) - return (void *) table->DebugReportMessageLUNARG; + if (!strcmp(name, "CreateDebugReportCallbackEXT")) + return (void *) table->CreateDebugReportCallbackEXT; + if (!strcmp(name, "DestroyDebugReportCallbackEXT")) + return (void *) table->DestroyDebugReportCallbackEXT; + if (!strcmp(name, "DebugReportMessageEXT")) + return (void *) table->DebugReportMessageEXT; return NULL; } diff --git a/loader/trampoline.c b/loader/trampoline.c index 3c32d97b..bac994a1 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -44,7 +44,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( { struct loader_instance *ptr_instance = NULL; VkResult res = VK_ERROR_INITIALIZATION_FAILED; - VkDebugReportCallbackLUNARG instance_callback = VK_NULL_HANDLE; + VkDebugReportCallbackEXT instance_callback = VK_NULL_HANDLE; void *pNext = (void *) pCreateInfo->pNext; loader_platform_thread_once(&once_init, loader_initialize); @@ -75,8 +75,8 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( * and setup a callback if found. */ while (pNext) { - if (((VkInstanceCreateInfo *)pNext)->sType == VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_LUNARG) { - instance_callback = (VkDebugReportCallbackLUNARG) ptr_instance; + if (((VkInstanceCreateInfo *)pNext)->sType == VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT) { + instance_callback = (VkDebugReportCallbackEXT) ptr_instance; if (util_CreateDebugReportCallback(ptr_instance, pNext, pAllocator, instance_callback)) { loader_heap_free(ptr_instance, ptr_instance); loader_platform_thread_unlock_mutex(&loader_lock); -- cgit v1.2.3