aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2016-04-01 13:34:08 -0600
committerMark Lobodzinski <mark@lunarg.com>2016-04-01 15:08:47 -0600
commit2b7935ed36a3b7694ec5a0468058e9f26f1451de (patch)
tree5f8e006726c3e435d88be36b6d1fd93ca2a33241 /layers/core_validation.cpp
parente26f199d098d1ee2ab2418d4ba259d564fbde4d8 (diff)
downloadusermoji-2b7935ed36a3b7694ec5a0468058e9f26f1451de.tar.xz
layers: LX459,GH#99,#100, Fix semaphore reference count
QueueSubmit waitSemaphore refcounts were getting incremented instead of decremented, resulting in invalid 'semaphore still in use' errors. Change-Id: I8ac224115b8ee43637b8de4b377750b277cfd22b
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 3ea8a567..20c9076c 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5275,9 +5275,9 @@ vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits,
vector<VkSemaphore> semaphoreList;
for (uint32_t i = 0; i < submit->waitSemaphoreCount; ++i) {
const VkSemaphore &semaphore = submit->pWaitSemaphores[i];
- semaphoreList.push_back(semaphore);
if (dev_data->semaphoreMap[semaphore].signaled) {
dev_data->semaphoreMap[semaphore].signaled = 0;
+ dev_data->semaphoreMap[semaphore].in_use.fetch_sub(1);
} else {
skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS,
@@ -10589,6 +10589,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchai
"vkAcquireNextImageKHR: Semaphore must not be currently signaled or in a wait state");
}
dev_data->semaphoreMap[semaphore].state = MEMTRACK_SEMAPHORE_STATE_SIGNALLED;
+ dev_data->semaphoreMap[semaphore].in_use.fetch_add(1);
}
auto fence_data = dev_data->fenceMap.find(fence);
if (fence_data != dev_data->fenceMap.end()) {