diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-04-14 07:02:43 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-04-14 10:20:33 -0600 |
| commit | 98fa64436e9553f92010d236c1858dbd242aa32a (patch) | |
| tree | 75caa5224b2ca0e3bf1e5ccf54efd372e3392763 /layers/core_validation.cpp | |
| parent | 48880ad8812f282f7087da5009645ea5758ef2f8 (diff) | |
| download | usermoji-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.cpp | 8 |
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 |
