From cb35cef6cbe50805c30fec7dceae8db911d4447f Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 1 Dec 2016 09:37:56 -0700 Subject: layers:Handle NULL DebugMarker function ptrs Fixes #1074 Object_tracker and parameter_checker intercept DebugMarker extension functions which may not be supported by underlying device and therefore could terminate with a NULL function call. Updating these layers to handle this case by making sure that their downstream function ptr is not null before calling down the chain. If the downstream function ptr is null, considering that VK_SUCCESS in the layers for functions with VkResult return code. --- layers/object_tracker.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layers/object_tracker.h') diff --git a/layers/object_tracker.h b/layers/object_tracker.h index bf548e4d..8f852f80 100644 --- a/layers/object_tracker.h +++ b/layers/object_tracker.h @@ -113,11 +113,12 @@ struct layer_data { // Map of queue information structures, one per queue std::unordered_map queue_info_map; + VkLayerDispatchTable dispatch_table; // Default constructor layer_data() : instance(nullptr), physical_device(nullptr), num_objects{}, num_total_objects(0), report_data(nullptr), wsi_enabled(false), wsi_display_swapchain_enabled(false), objtrack_extensions_enabled(false), num_tmp_callbacks(0), - tmp_dbg_create_infos(nullptr), tmp_callbacks(nullptr), object_map{} { + tmp_dbg_create_infos(nullptr), tmp_callbacks(nullptr), object_map{}, dispatch_table{} { object_map.resize(VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT + 1); } }; -- cgit v1.2.3