From 0dd40a6100a0be62a504a67f4426b7a0d304ed5b Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Wed, 14 Feb 2018 14:39:46 -0800 Subject: layers: add GetDeviceQueue2() support This change add GetDeviceQueue2() support to object tracker and core validation layers. --- layers/core_validation.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 51223dca..87bb7697 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3318,6 +3318,16 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyI PostCallRecordGetDeviceQueue(dev_data, queueFamilyIndex, *pQueue); } +VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2(VkDevice device, VkDeviceQueueInfo2 *pQueueInfo, VkQueue *pQueue) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetDeviceQueue2(device, pQueueInfo, pQueue); + lock_guard_t lock(global_lock); + + if (*pQueue != VK_NULL_HANDLE) { + PostCallRecordGetDeviceQueue(dev_data, pQueueInfo->queueFamilyIndex, *pQueue); + } +} + static bool PreCallValidateQueueWaitIdle(layer_data *dev_data, VkQueue queue, QUEUE_STATE **queue_state) { *queue_state = GetQueueState(dev_data, queue); if (dev_data->instance_data->disabled.queue_wait_idle) return false; @@ -12313,6 +12323,7 @@ static const std::unordered_map name_to_funcptr_map = { {"vkQueueWaitIdle", (void *)QueueWaitIdle}, {"vkDeviceWaitIdle", (void *)DeviceWaitIdle}, {"vkGetDeviceQueue", (void *)GetDeviceQueue}, + {"vkGetDeviceQueue2", (void *)GetDeviceQueue2}, {"vkDestroyDevice", (void *)DestroyDevice}, {"vkDestroyFence", (void *)DestroyFence}, {"vkResetFences", (void *)ResetFences}, -- cgit v1.2.3