From 736e979cbb2579384ee420dc349de4611bdee3ee Mon Sep 17 00:00:00 2001 From: Artem Kharytoniuk Date: Fri, 22 Nov 2024 23:58:05 +0100 Subject: [PATCH] layers: Replace unassigned VUIDs for ownership transfer --- layers/containers/qfo_transfer.h | 4 ---- layers/core_checks/cc_synchronization.cpp | 4 +++- tests/unit/sync_object.cpp | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/layers/containers/qfo_transfer.h b/layers/containers/qfo_transfer.h index 38930bd6dc3..d56111c50e2 100644 --- a/layers/containers/qfo_transfer.h +++ b/layers/containers/qfo_transfer.h @@ -88,8 +88,6 @@ struct QFOImageTransferBarrier : public QFOTransferBarrierBase { 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 @@ -118,8 +116,6 @@ struct QFOBufferTransferBarrier : public QFOTransferBarrierBase { 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 diff --git a/layers/core_checks/cc_synchronization.cpp b/layers/core_checks/cc_synchronization.cpp index bcb3819a614..8a92df4ce77 100644 --- a/layers/core_checks/cc_synchronization.cpp +++ b/layers/core_checks/cc_synchronization.cpp @@ -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, diff --git a/tests/unit/sync_object.cpp b/tests/unit/sync_object.cpp index a43c3f26f2b..04ce6aaaeba 100644 --- a/tests/unit/sync_object.cpp +++ b/tests/unit/sync_object.cpp @@ -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);