aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-10-25 16:57:04 -0600
committerMike Schuchardt <mikes@lunarg.com>2018-03-09 13:54:31 -0700
commit3e557722aba9c244a3efb535afed3850e5723abe (patch)
tree1814d368c13cd68cb954680b99aa5203697687a8
parent84f5a59a6a8a0ad1190a17003367ef3b34e8da2d (diff)
downloadusermoji-3e557722aba9c244a3efb535afed3850e5723abe.tar.xz
layers: Updated Object Tracker layer for aliases
GetPhysicalDeviceQueueFamilyProperties2[KHR]
-rw-r--r--layers/object_tracker_utils.cpp28
-rw-r--r--scripts/object_tracker_generator.py1
2 files changed, 29 insertions, 0 deletions
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<std::mutex> 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<std::mutex> 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',