From 48d23cc83dbd8966443c191ea031d2889df84bc5 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Tue, 19 Jan 2016 16:08:39 -0700 Subject: [PATCH] debug_report: Integrate review feedback Conflicts: include/vulkan/vk_ext_debug_report.h Conflicts: include/vulkan/vk_ext_debug_report.h --- include/vulkan/vk_ext_debug_report.h | 19 ++++++++++--------- layers/device_limits.cpp | 2 +- layers/draw_state.cpp | 2 +- layers/image.cpp | 2 +- layers/mem_tracker.cpp | 2 +- layers/param_checker.cpp | 2 +- layers/swapchain.cpp | 2 +- layers/vk_layer_logging.h | 6 +++--- loader/debug_report.c | 2 +- vk-layer-generate.py | 2 +- 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/vulkan/vk_ext_debug_report.h b/include/vulkan/vk_ext_debug_report.h index e9577b9..4ed33f3 100644 --- a/include/vulkan/vk_ext_debug_report.h +++ b/include/vulkan/vk_ext_debug_report.h @@ -44,11 +44,11 @@ extern "C" * DebugReport Vulkan Extension API *************************************************************************************************** */ + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) -#define VK_EXT_DEBUG_REPORT_REVISION 2 -#define VK_EXT_DEBUG_REPORT_EXTENSION_NUMBER 11 +#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 1 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" @@ -85,10 +85,11 @@ typedef enum VkDebugReportObjectTypeEXT { } VkDebugReportObjectTypeEXT; typedef enum VkDebugReportErrorEXT { - VK_DEBUG_REPORT_ERROR_NONE = 0, - VK_DEBUG_REPORT_ERROR_CALLBACK_REF = 1, + VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, + VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, } VkDebugReportErrorEXT; + typedef enum VkDebugReportFlagBitsEXT { VK_DEBUG_REPORT_INFO_BIT_EXT = 0x00000001, VK_DEBUG_REPORT_WARN_BIT_EXT = 0x00000002, @@ -110,11 +111,11 @@ typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( typedef struct VkDebugReportCallbackCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkDebugReportFlagsEXT flags; - PFN_vkDebugReportCallbackEXT pfnCallback; - void* pUserData; + VkStructureType sType; + const void* pNext; + VkDebugReportFlagsEXT flags; + PFN_vkDebugReportCallbackEXT pfnCallback; + void* pUserData; } VkDebugReportCallbackCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index 24df64e..8648f5c 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -152,7 +152,7 @@ static void init_device_limits(layer_data *my_data, const VkAllocationCallbacks static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 8d6ac65..41cf1b4 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -2964,7 +2964,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, cons static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/image.cpp b/layers/image.cpp index f371bdc..a821712 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -245,7 +245,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, cons static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index afcc7cd..a29a6a4 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -1266,7 +1266,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties( static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index f63562d..1a5affe 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -167,7 +167,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index 051d14f..2f02f95 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -45,7 +45,7 @@ template layer_data *get_my_data_ptr( static const VkExtensionProperties instance_extensions[] = { { VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - VK_EXT_DEBUG_REPORT_REVISION + VK_EXT_DEBUG_REPORT_SPEC_VERSION } }; diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index 06a27a3..e199472 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -122,7 +122,7 @@ static inline void layer_debug_report_destroy_instance(debug_report_data *debug_ debug_report_log_msg( debug_data, VK_DEBUG_REPORT_WARN_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, (uint64_t) pTrav->msgCallback, - 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF, + 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT, "DebugReport", "Debug Report callbacks not removed before DestroyInstance"); @@ -174,7 +174,7 @@ static inline VkResult layer_create_msg_callback( debug_report_log_msg( debug_data, VK_DEBUG_REPORT_DEBUG_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, (uint64_t) *pCallback, - 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF, + 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT, "DebugReport", "Added callback"); return VK_SUCCESS; @@ -200,7 +200,7 @@ static inline void layer_destroy_msg_callback( debug_report_log_msg( debug_data, VK_DEBUG_REPORT_DEBUG_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, (uint64_t) pTrav->msgCallback, - 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF, + 0, VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT, "DebugReport", "Destroyed callback"); } else { diff --git a/loader/debug_report.c b/loader/debug_report.c index f949729..9a58168 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -42,7 +42,7 @@ typedef void (VKAPI_PTR *PFN_stringCallback)(char *message); static const VkExtensionProperties debug_report_extension_info = { .extensionName = VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - .specVersion = VK_EXT_DEBUG_REPORT_REVISION, + .specVersion = VK_EXT_DEBUG_REPORT_SPEC_VERSION, }; void debug_report_add_instance_extensions( diff --git a/vk-layer-generate.py b/vk-layer-generate.py index aafa8b4..ba599d4 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -353,7 +353,7 @@ class Subcommand(object): ggep_body.append('static const VkExtensionProperties instance_extensions[] = {') ggep_body.append(' {') ggep_body.append(' VK_EXT_DEBUG_REPORT_EXTENSION_NAME,') - ggep_body.append(' VK_EXT_DEBUG_REPORT_REVISION') + ggep_body.append(' VK_EXT_DEBUG_REPORT_SPEC_VERSION') ggep_body.append(' }') ggep_body.append('};') ggep_body.append('VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, VkExtensionProperties* pProperties)') -- 2.7.4