From c9a04ccb0774fc5be9569586dc94da7212ce4dfd Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 16 Jun 2016 12:17:09 +1200 Subject: layers: Add getSemaphoreNode helper Change-Id: Iceda3b28474e289189ef1f97b271f9e9bb7b2083 Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ed4c1fca..93ea5b20 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -334,6 +334,14 @@ QUEUE_NODE *getQueueNode(layer_data *dev_data, VkQueue queue) { return &it->second; } +SEMAPHORE_NODE *getSemaphoreNode(layer_data *dev_data, VkSemaphore semaphore) { + auto it = dev_data->semaphoreMap.find(semaphore); + if (it == dev_data->semaphoreMap.end()) { + return nullptr; + } + return &it->second; +} + static VkDeviceMemory *get_object_mem_binding(layer_data *my_data, uint64_t handle, VkDebugReportObjectTypeEXT type) { switch (type) { case VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT: { -- cgit v1.2.3