aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-04-14 07:02:43 -0600
committerTobin Ehlis <tobine@google.com>2016-04-14 10:20:33 -0600
commit98fa64436e9553f92010d236c1858dbd242aa32a (patch)
tree75caa5224b2ca0e3bf1e5ccf54efd372e3392763 /layers/core_validation.cpp
parent48880ad8812f282f7087da5009645ea5758ef2f8 (diff)
downloadusermoji-98fa64436e9553f92010d236c1858dbd242aa32a.tar.xz
layers: GH337 Track fence from vkQueueBindSparse
Correctly update fence tracking for vkQueueBindSparse() call.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index acbd996d..e0b1529b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -10110,6 +10110,14 @@ vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo
VkResult result = VK_ERROR_VALIDATION_FAILED_EXT;
bool skip_call = false;
loader_platform_thread_lock_mutex(&globalLock);
+ // First verify that fence is not in use
+ if ((fence != VK_NULL_HANDLE) && (bindInfoCount != 0) && dev_data->fenceMap[fence].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));
+ }
+ uint64_t fenceId = 0;
+ skip_call = add_fence_info(dev_data, fence, queue, &fenceId);
for (uint32_t bindIdx = 0; bindIdx < bindInfoCount; ++bindIdx) {
const VkBindSparseInfo &bindInfo = pBindInfo[bindIdx];
// Track objects tied to memory