aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-06-10 15:22:37 +1200
committerTobin Ehlis <tobine@google.com>2016-06-13 14:56:31 -0600
commit9d7cfa74ea05b82310bf89b2dec24782e04f0fb9 (patch)
tree697b0280c381a35e84e3437a69472defcb5e2257
parent20f5d77ec2df63f69c818afad21b21f94f537701 (diff)
downloadusermoji-9d7cfa74ea05b82310bf89b2dec24782e04f0fb9.tar.xz
layers: Add members to FENCE_NODE and QUEUE_NODE to hold the handles
We'd like to be able to get back to them from the tracking struct. Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/core_validation.cpp2
-rw-r--r--layers/core_validation.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 1ebd4a51..7dbbd343 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -4841,6 +4841,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyI
auto result = dev_data->queues.emplace(*pQueue);
if (result.second == true) {
QUEUE_NODE *pQNode = &dev_data->queueMap[*pQueue];
+ pQNode->queue = *pQueue;
pQNode->device = device;
}
}
@@ -5593,6 +5594,7 @@ CreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAlloc
if (VK_SUCCESS == result) {
std::lock_guard<std::mutex> lock(global_lock);
auto &fence_node = dev_data->fenceMap[*pFence];
+ fence_node.fence = *pFence;
fence_node.createInfo = *pCreateInfo;
fence_node.needsSignaled = true;
if (pCreateInfo->flags & VK_FENCE_CREATE_SIGNALED_BIT) {
diff --git a/layers/core_validation.h b/layers/core_validation.h
index 00420e48..26c3edc9 100644
--- a/layers/core_validation.h
+++ b/layers/core_validation.h
@@ -212,6 +212,7 @@ class FENCE_NODE : public BASE_NODE {
public:
using BASE_NODE::in_use;
+ VkFence fence;
VkSwapchainKHR swapchain; // Swapchain that this fence is submitted against or NULL
bool firstTimeFlag; // Fence was created in signaled state, avoid warnings for first use
VkFenceCreateInfo createInfo;
@@ -241,6 +242,7 @@ class EVENT_NODE : public BASE_NODE {
class QUEUE_NODE {
public:
+ VkQueue queue;
VkDevice device;
std::vector<VkFence> lastFences;
#if MTMERGE