From: Mark Lobodzinski Date: Mon, 12 Jun 2017 16:19:26 +0000 (-0600) Subject: layers: Add in missing CreatDevice physdev obj check X-Git-Tag: submit/tizen/20181227.054638~1054 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa3003ba767c05d3ea1539f242885189ddf3a259;p=platform%2Fupstream%2FVulkan-Tools.git layers: Add in missing CreatDevice physdev obj check Prevents doc validator from failing. Change-Id: I0e70da954f0a7d7ed4a54d4bcefe996a6cc9cfb3 --- diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index a4acc720..1265524a 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -3282,6 +3282,10 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { std::lock_guard lock(global_lock); + bool skip = ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_1fc27a01, + VALIDATION_ERROR_UNDEFINED); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + layer_data *phy_dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); VkLayerDeviceCreateInfo *chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO);