From: Tobin Ehlis Date: Tue, 7 Feb 2017 22:21:00 +0000 (-0700) Subject: layers:Add physicalDevice check X-Git-Tag: upstream/1.1.92~1620 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79343aac8492c6cddd58ee7fc29745e7408dd789;p=platform%2Fupstream%2FVulkan-Tools.git layers:Add physicalDevice check Update GetPhysicalDeviceQueueFamilyProperties() in object_tracker to verify that physicalDevice is valid. --- diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index e0d7078..39d1c63 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -3261,6 +3261,15 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) { + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= ValidateObject(physicalDevice, physicalDevice, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, false, + VALIDATION_ERROR_00028); + } + if (skip) { + return; + } get_dispatch_table(ot_instance_table_map, physicalDevice) ->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); std::lock_guard lock(global_lock);