Skip to content

Commit

Permalink
layers: Replace unassigned VUIDs for ownership transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-lunarg committed Nov 23, 2024
1 parent b9b8a23 commit 736e979
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions layers/containers/qfo_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ struct QFOImageTransferBarrier : public QFOTransferBarrierBase<VkImage> {
static const char *DuplicateQFOInSubmit() { return "WARNING-VkImageMemoryBarrier-image-00002"; }
// QFO transfer image barrier must not duplicate QFO submitted previously
static const char *DuplicateQFOSubmitted() { return "WARNING-VkImageMemoryBarrier-image-00003"; }
// QFO acquire image barrier must have matching QFO release submitted previously
static const char *MissingQFOReleaseInSubmit() { return "UNASSIGNED-VkImageMemoryBarrier-image-00004"; }
};

// Buffer barrier specific implementation
Expand Down Expand Up @@ -118,8 +116,6 @@ struct QFOBufferTransferBarrier : public QFOTransferBarrierBase<VkBuffer> {
static const char *DuplicateQFOInSubmit() { return "WARNING-VkBufferMemoryBarrier-buffer-00002"; }
// QFO transfer buffer barrier must not duplicate QFO submitted previously
static const char *DuplicateQFOSubmitted() { return "WARNING-VkBufferMemoryBarrier-buffer-00003"; }
// QFO acquire buffer barrier must have matching QFO release submitted previously
static const char *MissingQFOReleaseInSubmit() { return "UNASSIGNED-VkBufferMemoryBarrier-buffer-00004"; }
};

template <typename TransferBarrier>
Expand Down
4 changes: 3 additions & 1 deletion layers/core_checks/cc_synchronization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,9 @@ bool CoreChecks::ValidateQueuedQFOTransferBarriers(const vvl::CommandBuffer &cb_
matching_release_found = set_for_handle.find(acquire) != set_for_handle.cend();
}
if (!matching_release_found) {
skip |= LogError(TransferBarrier::MissingQFOReleaseInSubmit(), cb_state.Handle(), loc,
const char *vuid = (loc.function == vvl::Func::vkQueueSubmit) ? "VUID-vkQueueSubmit-pSubmits-02207"
: "VUID-vkQueueSubmit2-commandBuffer-03879";
skip |= LogError(vuid, cb_state.Handle(), loc,
"in submitted command buffer %s acquiring ownership of %s (%s), from srcQueueFamilyIndex %" PRIu32
" to dstQueueFamilyIndex %" PRIu32 " has no matching release barrier queued for execution.",
barrier_name, handle_name, FormatHandle(acquire.handle).c_str(), acquire.srcQueueFamilyIndex,
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/sync_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,7 @@ TEST_F(NegativeSyncObject, BarrierQueueFamily2) {
excl_test("WARNING-VkImageMemoryBarrier-image-00001", "WARNING-VkBufferMemoryBarrier-buffer-00001", submit_family, other_family,
other_family, BarrierQueueFamilyTestHelper::DOUBLE_RECORD);
// No pending release
excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00004", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00004", submit_family,
other_family, other_family);
excl_test("VUID-vkQueueSubmit-pSubmits-02207", "VUID-vkQueueSubmit-pSubmits-02207", submit_family, other_family, other_family);
// Duplicate release in two CB
excl_test("WARNING-VkImageMemoryBarrier-image-00002", "WARNING-VkBufferMemoryBarrier-buffer-00002", submit_family, other_family,
submit_family, BarrierQueueFamilyTestHelper::DOUBLE_COMMAND_BUFFER);
Expand Down

0 comments on commit 736e979

Please sign in to comment.