From db6a8d55264aa3eaf2a6ecf14734263fb74c6a80 Mon Sep 17 00:00:00 2001 From: Mark Mueller Date: Tue, 3 May 2016 13:17:29 -0600 Subject: layers:LX#470 Fix poor use of hex vs dec output 1) Introduce convention of explicitly placing "0x" before hex format requests for clarity (don't use "%#") 2) All lower case in hex output (except w/stringstream which refuses to do anything but uppercase, possibly only on windows). 3) Decorated pointers are printed for all Vulkan structure types. 3) Some intelligence in generators based on Vulkan variable name: if the Vulkan variable name contains ("flag", "bit", "offset", "handle", "buffer", "object", "mask") it will be output in hexadecimal format 4) Remove "using namespace std;" from global scope of vk_struct_string_helper_cpp.h Change-Id: Idbae73bfdaa3bc059543d43b209373cd0bcbc099 --- layers/parameter_validation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'layers/parameter_validation.cpp') diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 19503573..eefa5c13 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -75,7 +75,7 @@ debug_report_data *mid(VkInstance object) { dispatch_key key = get_dispatch_key(object); layer_data *data = get_my_data_ptr(key, layer_data_map); #if DISPATCH_MAP_DEBUG - fprintf(stderr, "MID: map: %p, object: %p, key: %p, data: %p\n", &layer_data_map, object, key, data); + fprintf(stderr, "MID: map: 0x%p, object: 0x%p, key: 0x%p, data: 0x%p\n", &layer_data_map, object, key, data); #endif assert(data != NULL); @@ -87,7 +87,7 @@ debug_report_data *mdd(void *object) { dispatch_key key = get_dispatch_key(object); layer_data *data = get_my_data_ptr(key, layer_data_map); #if DISPATCH_MAP_DEBUG - fprintf(stderr, "MDD: map: %p, object: %p, key: %p, data: %p\n", &layer_data_map, object, key, data); + fprintf(stderr, "MDD: map: 0x%p, object: 0x%p, key: 0x%p, data: 0x%p\n", &layer_data_map, object, key, data); #endif assert(data != NULL); return data->report_data; @@ -1664,7 +1664,7 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, cons layer_debug_report_destroy_device(device); #if DISPATCH_MAP_DEBUG - fprintf(stderr, "Device: %p, key: %p\n", device, key); + fprintf(stderr, "Device: 0x%p, key: 0x%p\n", device, key); #endif get_dispatch_table(pc_device_table_map, device)->DestroyDevice(device, pAllocator); -- cgit v1.2.3