From 3e557722aba9c244a3efb535afed3850e5723abe Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 25 Oct 2017 16:57:04 -0600 Subject: layers: Updated Object Tracker layer for aliases GetPhysicalDeviceQueueFamilyProperties2[KHR] --- layers/object_tracker_utils.cpp | 28 ++++++++++++++++++++++++++++ scripts/object_tracker_generator.py | 1 + 2 files changed, 29 insertions(+) diff --git a/layers/object_tracker_utils.cpp b/layers/object_tracker_utils.cpp index 957f347e..c9573dd3 100644 --- a/layers/object_tracker_utils.cpp +++ b/layers/object_tracker_utils.cpp @@ -1006,6 +1006,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool com get_dispatch_table(ot_device_table_map, device)->DestroyCommandPool(device, commandPool, pAllocator); } +// Note: This is the core version of this routine. The extension version is below. +VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, + uint32_t *pQueueFamilyPropertyCount, + VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } + if (skip) { + return; + } + get_dispatch_table(ot_instance_table_map, physicalDevice) + ->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + std::lock_guard lock(global_lock); + if (pQueueFamilyProperties != NULL) { + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { + instance_data->queue_family_properties.resize(*pQueueFamilyPropertyCount); + } + for (uint32_t i = 0; i < *pQueueFamilyPropertyCount; i++) { + instance_data->queue_family_properties[i] = pQueueFamilyProperties[i].queueFamilyProperties; + } + } +} + +// Note: This is the extension version of this routine. The core version is above. VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { diff --git a/scripts/object_tracker_generator.py b/scripts/object_tracker_generator.py index c2217a70..405a5b7c 100644 --- a/scripts/object_tracker_generator.py +++ b/scripts/object_tracker_generator.py @@ -140,6 +140,7 @@ class ObjectTrackerOutputGenerator(OutputGenerator): 'vkDestroySwapchainKHR', 'vkDestroyDescriptorPool', 'vkDestroyCommandPool', + 'vkGetPhysicalDeviceQueueFamilyProperties2', 'vkGetPhysicalDeviceQueueFamilyProperties2KHR', 'vkResetDescriptorPool', 'vkBeginCommandBuffer', -- cgit v1.2.3