aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2016-04-29 17:46:35 -0500
committerTobin Ehlis <tobine@google.com>2016-05-02 10:47:15 -0600
commitec39dea8ac07d7d78e1bd2b8fa8d77911a272009 (patch)
tree225842ed6aa7dff2a7b2fcf995501f113d1bf776
parente8a09e37794ffb3c93f65e9c4a0e4857a7d3ac7a (diff)
downloadusermoji-ec39dea8ac07d7d78e1bd2b8fa8d77911a272009.tar.xz
layers: Add fence in use for bind sparse info.
-rw-r--r--layers/core_validation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index f938326e..e2f04d7c 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -9966,14 +9966,15 @@ vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo
std::unique_lock<std::mutex> lock(global_lock);
// First verify that fence is not in use
if (fence != VK_NULL_HANDLE) {
- dev_data->fenceMap[fence].queue = queue;
- if ((bindInfoCount != 0) && dev_data->fenceMap[fence].in_use.load()) {
+ trackCommandBuffers(dev_data, queue, 0, nullptr, fence);
+ auto fence_data = dev_data->fenceMap.find(fence);
+ if ((bindInfoCount != 0) && fence_data->second.in_use.load()) {
skip_call |=
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
reinterpret_cast<uint64_t &>(fence), __LINE__, DRAWSTATE_INVALID_FENCE, "DS",
"Fence %#" PRIx64 " is already in use by another submission.", reinterpret_cast<uint64_t &>(fence));
}
- if (!dev_data->fenceMap[fence].needsSignaled) {
+ if (!fence_data->second.needsSignaled) {
skip_call |=
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
reinterpret_cast<uint64_t &>(fence), __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM",