layers: Enable fine-grained filtering of swapchain log messages
authorMark Lobodzinski <mark@lunarg.com>
Mon, 4 Jan 2016 22:54:59 +0000 (15:54 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Mon, 4 Jan 2016 23:12:13 +0000 (16:12 -0700)
layers/swapchain.cpp
layers/swapchain.h

index a60ed20..20aa252 100644 (file)
@@ -96,7 +96,7 @@ static void createDeviceRegisterExtensions(VkPhysicalDevice physicalDevice, cons
         pPhysicalDevice->pDevice = &my_device_data->deviceMap[device];
     } else {
         log_msg(my_instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
-                (uint64_t)physicalDevice , 0, SWAPCHAIN_INVALID_HANDLE, "Swapchain",
+                (uint64_t)physicalDevice , __LINE__, SWAPCHAIN_INVALID_HANDLE, "Swapchain",
                 "vkCreateDevice() called with a non-valid VkPhysicalDevice.");
     }
     my_device_data->deviceMap[device].device = device;
@@ -708,7 +708,7 @@ static VkBool32 validateCreateSwapchainKHR(VkDevice device, const VkSwapchainCre
             skipCall |= debug_report_log_msg(my_data->report_data,
                                              VK_DEBUG_REPORT_ERROR_BIT_EXT,
                                              VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
-                                             (uint64_t) device, 0,
+                                             (uint64_t) device, __LINE__,
                                              SWAPCHAIN_CREATE_SWAP_BAD_PRE_TRANSFORM,
                                              LAYER_NAME,
                                              errorString.c_str());
index 2b5a333..d854d1b 100644 (file)
@@ -86,19 +86,19 @@ typedef enum _SWAPCHAIN_ERROR
 #define LOG_ERROR_NON_VALID_OBJ(objType, type, obj)                     \
     (my_data) ?                                                         \
         log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (objType), \
-                (uint64_t) (obj), 0, SWAPCHAIN_INVALID_HANDLE, LAYER_NAME, \
+                (uint64_t) (obj), __LINE__, SWAPCHAIN_INVALID_HANDLE, LAYER_NAME, \
                 "%s() called with a non-valid %s.", __FUNCTION__, (obj)) \
     : VK_FALSE
 
 #define LOG_ERROR(objType, type, obj, enm, fmt, ...)                    \
     (my_data) ?                                                         \
         log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (objType), \
-                (uint64_t) (obj), 0, (enm), LAYER_NAME, (fmt), __VA_ARGS__) \
+                (uint64_t) (obj), __LINE__, (enm), LAYER_NAME, (fmt), __VA_ARGS__) \
     : VK_FALSE
 #define LOG_PERF_WARNING(objType, type, obj, enm, fmt, ...)             \
     (my_data) ?                                                         \
         log_msg(my_data->report_data, VK_DEBUG_REPORT_PERF_WARN_BIT_EXT, (objType), \
-                (uint64_t) (obj), 0, (enm), LAYER_NAME, (fmt), __VA_ARGS__) \
+                (uint64_t) (obj), __LINE__, (enm), LAYER_NAME, (fmt), __VA_ARGS__) \
     : VK_FALSE