aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-06-15 13:10:28 +1200
committerMark Lobodzinski <mark@lunarg.com>2016-06-20 15:48:32 -0600
commitbe30e5771399d7efbaf5f686933b70d86625eb16 (patch)
treeea5cfa398f26c7ba559a93afcd3820a4ec973dee
parent6f5bf2f2c7ee5dbabd9ed449f66fa34aef99ce16 (diff)
downloadusermoji-be30e5771399d7efbaf5f686933b70d86625eb16.tar.xz
layers: Pass layer_data to verifyWaitFenceState
Change-Id: Id3e0f09254197119b821710f0e9ce27d3458afc9 Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/core_validation.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 392eab1a..74f41c31 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -4778,21 +4778,20 @@ static void initializeAndTrackMemory(layer_data *dev_data, VkDeviceMemory mem, V
// Verify that state for fence being waited on is appropriate. That is,
// a fence being waited on should not already be signalled and
// it should have been submitted on a queue or during acquire next image
-static inline bool verifyWaitFenceState(VkDevice device, VkFence fence, const char *apiCall) {
- layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
+static inline bool verifyWaitFenceState(layer_data *dev_data, VkFence fence, const char *apiCall) {
bool skipCall = false;
- auto pFence = getFenceNode(my_data, fence);
+ auto pFence = getFenceNode(dev_data, fence);
if (pFence) {
if (!pFence->firstTimeFlag) {
if (!pFence->needsSignaled) {
skipCall |=
- log_msg(my_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
+ log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
(uint64_t)fence, __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM",
"%s specified fence 0x%" PRIxLEAST64 " already in SIGNALED state.", apiCall, (uint64_t)fence);
}
if (pFence->queues.empty() && !pFence->swapchain) { // Checking status of unsubmitted fence
- skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
+ skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
reinterpret_cast<uint64_t &>(fence), __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM",
"%s called for fence 0x%" PRIxLEAST64 " which has not been submitted on a Queue or during "
"acquire next image.",
@@ -4812,7 +4811,7 @@ WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBo
// Verify fence status of submitted fences
std::unique_lock<std::mutex> lock(global_lock);
for (uint32_t i = 0; i < fenceCount; i++) {
- skip_call |= verifyWaitFenceState(device, pFences[i], "vkWaitForFences");
+ skip_call |= verifyWaitFenceState(dev_data, pFences[i], "vkWaitForFences");
}
lock.unlock();
if (skip_call)
@@ -4841,7 +4840,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence) {
bool skipCall = false;
VkResult result = VK_ERROR_VALIDATION_FAILED_EXT;
std::unique_lock<std::mutex> lock(global_lock);
- skipCall = verifyWaitFenceState(device, fence, "vkGetFenceStatus");
+ skipCall = verifyWaitFenceState(dev_data, fence, "vkGetFenceStatus");
lock.unlock();
if (skipCall)