diff --git a/BUILD.gn b/BUILD.gn index 3d84bce66eb..b4e6949e0a7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -150,7 +150,6 @@ vvl_sources = [ "layers/drawdispatch/descriptor_validator.h", "layers/drawdispatch/drawdispatch_vuids.cpp", "layers/drawdispatch/drawdispatch_vuids.h", - "layers/error_message/validation_error_enums.h", "layers/external/vma/vk_mem_alloc.h", "layers/external/vma/vma.cpp", "layers/external/vma/vma.h", diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 590ad9a2f7a..c38feb4b004 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -165,7 +165,6 @@ target_sources(vvl PRIVATE core_checks/cc_ycbcr.cpp drawdispatch/descriptor_validator.cpp drawdispatch/drawdispatch_vuids.cpp - error_message/validation_error_enums.h external/vma/vma.h external/vma/vma.cpp ${API_TYPE}/generated/best_practices.cpp diff --git a/layers/best_practices/best_practices_error_enums.h b/layers/best_practices/best_practices_error_enums.h index bb8a584c2dc..7174d0aa634 100644 --- a/layers/best_practices/best_practices_error_enums.h +++ b/layers/best_practices/best_practices_error_enums.h @@ -122,6 +122,7 @@ "UNASSIGNED-BestPractices-vkCreateRenderPass-SubpassResolve-NonOptimalFormat"; [[maybe_unused]] static const char *kVUID_BestPractices_Swapchain_InvalidCount = "UNASSIGNED-BestPractices-SwapchainInvalidCount"; +[[maybe_unused]] static const char *kVUID_BestPractices_Swapchain_PriorCount = "UNASSIGNED-BestPractices-SwapchainPriorCount"; [[maybe_unused]] static const char *kVUID_BestPractices_DepthBiasNoAttachment = "UNASSIGNED-BestPractices-DepthBiasNoAttachment"; [[maybe_unused]] static const char *kVUID_BestPractices_SpirvDeprecated_WorkgroupSize = "UNASSIGNED-BestPractices-SpirvDeprecated_WorkgroupSize"; diff --git a/layers/best_practices/bp_wsi.cpp b/layers/best_practices/bp_wsi.cpp index 9bf3ec2af16..4befc89676a 100644 --- a/layers/best_practices/bp_wsi.cpp +++ b/layers/best_practices/bp_wsi.cpp @@ -76,7 +76,7 @@ bool BestPractices::PreCallValidateGetSwapchainImagesKHR(VkDevice device, VkSwap if (swapchain_state && pSwapchainImages) { // Compare the preliminary value of *pSwapchainImageCount with the value this time: if (swapchain_state->vkGetSwapchainImagesKHRState == UNCALLED) { - skip |= LogWarning(kVUID_Core_Swapchain_PriorCount, device, error_obj.location, + skip |= LogWarning(kVUID_BestPractices_Swapchain_PriorCount, device, error_obj.location, "called with non-NULL pSwapchainImageCount; but no prior positive value has " "been seen for pSwapchainImages."); } diff --git a/layers/containers/qfo_transfer.h b/layers/containers/qfo_transfer.h index 1553c0f742d..9f6040b033b 100644 --- a/layers/containers/qfo_transfer.h +++ b/layers/containers/qfo_transfer.h @@ -83,14 +83,14 @@ struct QFOImageTransferBarrier : public QFOTransferBarrierBase { // TODO: codegen a comprehensive complie time type -> string (and or other traits) template family static const char *BarrierName() { return "VkImageMemoryBarrier"; } static const char *HandleName() { return "VkImage"; } - // UNASSIGNED-VkImageMemoryBarrier-image-00001 QFO transfer image barrier must not duplicate QFO recorded in command buffer - static const char *ErrMsgDuplicateQFOInCB() { return "UNASSIGNED-VkImageMemoryBarrier-image-00001"; } - // UNASSIGNED-VkImageMemoryBarrier-image-00002 QFO transfer image barrier must not duplicate QFO submitted in batch - static const char *ErrMsgDuplicateQFOInSubmit() { return "UNASSIGNED-VkImageMemoryBarrier-image-00002"; } - // UNASSIGNED-VkImageMemoryBarrier-image-00003 QFO transfer image barrier must not duplicate QFO submitted previously - static const char *ErrMsgDuplicateQFOSubmitted() { return "UNASSIGNED-VkImageMemoryBarrier-image-00003"; } - // UNASSIGNED-VkImageMemoryBarrier-image-00004 QFO acquire image barrier must have matching QFO release submitted previously - static const char *ErrMsgMissingQFOReleaseInSubmit() { return "UNASSIGNED-VkImageMemoryBarrier-image-00004"; } + // QFO transfer image barrier must not duplicate QFO recorded in command buffer + static const char *DuplicateQFOInCB() { return "WARNING-VkImageMemoryBarrier-image-00001"; } + // QFO transfer image barrier must not duplicate QFO submitted in batch + 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 @@ -113,14 +113,14 @@ struct QFOBufferTransferBarrier : public QFOTransferBarrierBase { } static const char *BarrierName() { return "VkBufferMemoryBarrier"; } static const char *HandleName() { return "VkBuffer"; } - // UNASSIGNED-VkImageMemoryBarrier-buffer-00001 QFO transfer buffer barrier must not duplicate QFO recorded in command buffer - static const char *ErrMsgDuplicateQFOInCB() { return "UNASSIGNED-VkBufferMemoryBarrier-buffer-00001"; } - // UNASSIGNED-VkBufferMemoryBarrier-buffer-00002 QFO transfer buffer barrier must not duplicate QFO submitted in batch - static const char *ErrMsgDuplicateQFOInSubmit() { return "UNASSIGNED-VkBufferMemoryBarrier-buffer-00002"; } - // UNASSIGNED-VkBufferMemoryBarrier-buffer-00003 QFO transfer buffer barrier must not duplicate QFO submitted previously - static const char *ErrMsgDuplicateQFOSubmitted() { return "UNASSIGNED-VkBufferMemoryBarrier-buffer-00003"; } - // UNASSIGNED-VkBufferMemoryBarrier-buffer-00004 QFO acquire buffer barrier must have matching QFO release submitted previously - static const char *ErrMsgMissingQFOReleaseInSubmit() { return "UNASSIGNED-VkBufferMemoryBarrier-buffer-00004"; } + // QFO transfer buffer barrier must not duplicate QFO recorded in command buffer + static const char *DuplicateQFOInCB() { return "WARNING-VkBufferMemoryBarrier-buffer-00001"; } + // QFO transfer buffer barrier must not duplicate QFO submitted in batch + 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_buffer.cpp b/layers/core_checks/cc_buffer.cpp index 9f5969eeb76..cc57bef446a 100644 --- a/layers/core_checks/cc_buffer.cpp +++ b/layers/core_checks/cc_buffer.cpp @@ -308,7 +308,7 @@ bool CoreChecks::PreCallValidateCreateBufferView(VkDevice device, const VkBuffer if (vkuFormatIsDepthOrStencil(pCreateInfo->format)) { // Should never hopefully get here, but there are known driver advertising the wrong feature flags // see https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/4849 - skip |= LogError(kVUID_Core_invalidDepthStencilFormat, device, create_info_loc.dot(Field::format), + skip |= LogError("UNASSIGNED-VkBufferViewCreateInfo-depthStencil-format", device, create_info_loc.dot(Field::format), "is a depth/stencil format (%s) but depth/stencil formats do not have a " "defined sizes for alignment, replace with a color format.", string_VkFormat(pCreateInfo->format)); diff --git a/layers/core_checks/cc_cmd_buffer.cpp b/layers/core_checks/cc_cmd_buffer.cpp index ea6bd6b2f08..f3ceee0f76c 100644 --- a/layers/core_checks/cc_cmd_buffer.cpp +++ b/layers/core_checks/cc_cmd_buffer.cpp @@ -1264,6 +1264,7 @@ bool CoreChecks::PreCallValidateCmdExecuteCommands(VkCommandBuffer commandBuffer for (auto index = iter->range.begin; index < iter->range.end; index++) { const LogObjectList objlist(commandBuffer, pCommandBuffers[i]); const auto subresource = image_state->subresource_encoder.Decode(index); + // VU being worked on https://gitlab.khronos.org/vulkan/vulkan/-/issues/2456 skip |= LogError("UNASSIGNED-vkCmdExecuteCommands-commandBuffer-00001", objlist, cb_loc, "was executed using %s (subresource: aspectMask 0x%x array layer %" PRIu32 ", mip level %" PRIu32 ") which expects layout %s--instead, image %s layout is %s.", diff --git a/layers/core_checks/cc_descriptor.cpp b/layers/core_checks/cc_descriptor.cpp index 0673bf192da..75812f126a4 100644 --- a/layers/core_checks/cc_descriptor.cpp +++ b/layers/core_checks/cc_descriptor.cpp @@ -18,7 +18,6 @@ #include -#include "error_message/validation_error_enums.h" #include "core_validation.h" #include "state_tracker/descriptor_sets.h" #include "cc_buffer_address.h" @@ -1022,8 +1021,9 @@ bool CoreChecks::ValidateImageUpdate(VkImageView image_view, VkImageLayout image } // Validate that memory is bound to image + // VU being worked on https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5598 skip |= ValidateMemoryIsBoundToImage(LogObjectList(image), *image_node, image_info_loc.dot(Field::image), - kVUID_Core_Bound_Resource_FreedMemoryAccess); + "UNASSIGNED-VkDescriptorImageInfo-BoundResourceFreedMemoryAccess"); const LogObjectList objlist(iv_state->Handle(), image_node->Handle()); // KHR_maintenance1 allows rendering into 2D or 2DArray views which slice a 3D image, @@ -3119,7 +3119,7 @@ void CoreChecks::PostCallRecordAllocateDescriptorSets(VkDevice device, const VkD const VkDescriptorType type = layout->GetTypeFromIndex(j); if (!pool_state->IsAvailableType(type)) { // This check would be caught by validation if VK_KHR_maintenance1 was not enabled - LogWarning("UNASSIGNED-CoreValidation-AllocateDescriptorSets-WrongType", pool_state->Handle(), + LogWarning("WARNING-CoreValidation-AllocateDescriptorSets-WrongType", pool_state->Handle(), record_obj.location.dot(Field::pAllocateInfo).dot(Field::pSetLayouts, i), "binding %" PRIu32 " was created with %s but the " diff --git a/layers/core_checks/cc_device.cpp b/layers/core_checks/cc_device.cpp index d6d47bb7b4c..ac4f553d30b 100644 --- a/layers/core_checks/cc_device.cpp +++ b/layers/core_checks/cc_device.cpp @@ -461,7 +461,7 @@ void CoreChecks::CreateDevice(const VkDeviceCreateInfo *pCreateInfo) { read_file.close(); } else { Location loc(Func::vkCreateDevice); - LogInfo("UNASSIGNED-cache-file-error", device, loc, + LogInfo("WARNING-cache-file-error", device, loc, "Cannot open shader validation cache at %s for reading (it may not exist yet)", validation_cache_path.c_str()); } @@ -488,7 +488,7 @@ void CoreChecks::PreCallRecordDestroyDevice(VkDevice device, const VkAllocationC validation_cache_data = (char *)malloc(sizeof(char) * validation_cache_size); if (!validation_cache_data) { - LogInfo("UNASSIGNED-cache-memory-error", device, loc, "Validation Cache Memory Error"); + LogInfo("WARNING-cache-memory-error", device, loc, "Validation Cache Memory Error"); return; } @@ -496,7 +496,7 @@ void CoreChecks::PreCallRecordDestroyDevice(VkDevice device, const VkAllocationC CoreLayerGetValidationCacheDataEXT(device, core_validation_cache, &validation_cache_size, validation_cache_data); if (result != VK_SUCCESS) { - LogInfo("UNASSIGNED-cache-retrieval-error", device, loc, "Validation Cache Retrieval Error"); + LogInfo("WARNING-cache-retrieval-error", device, loc, "Validation Cache Retrieval Error"); free(validation_cache_data); return; } @@ -507,7 +507,7 @@ void CoreChecks::PreCallRecordDestroyDevice(VkDevice device, const VkAllocationC write_file.write(static_cast(validation_cache_data), validation_cache_size); write_file.close(); } else { - LogInfo("UNASSIGNED-cache-write-error", device, loc, "Cannot open shader validation cache at %s for writing", + LogInfo("WARNING-cache-write-error", device, loc, "Cannot open shader validation cache at %s for writing", validation_cache_path.c_str()); } } diff --git a/layers/core_checks/cc_device_memory.cpp b/layers/core_checks/cc_device_memory.cpp index 04cf7b39cf8..f4fecd579df 100644 --- a/layers/core_checks/cc_device_memory.cpp +++ b/layers/core_checks/cc_device_memory.cpp @@ -1436,8 +1436,9 @@ bool CoreChecks::ValidateBindImageMemory(uint32_t bindInfoCount, const VkBindIma } if (image_state->create_from_swapchain != swapchain_info->swapchain) { const LogObjectList objlist(bind_info.image, image_state->create_from_swapchain, swapchain_info->swapchain); + // VU being worked on https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5078 skip |= LogError( - kVUID_Core_BindImageMemory_Swapchain, objlist, loc.dot(Field::image), + "UNASSIGNED-CoreValidation-BindImageMemory-Swapchain", objlist, loc.dot(Field::image), "(%s) is created by %s, but the image is bound by %s. The image should be created and bound by the same " "swapchain", FormatHandle(bind_info.image).c_str(), FormatHandle(image_state->create_from_swapchain).c_str(), diff --git a/layers/core_checks/cc_image.cpp b/layers/core_checks/cc_image.cpp index a4664586db8..fc8a9db2ce6 100644 --- a/layers/core_checks/cc_image.cpp +++ b/layers/core_checks/cc_image.cpp @@ -308,7 +308,7 @@ bool CoreChecks::PreCallValidateCreateImage(VkDevice device, const VkImageCreate total_size = (total_size + ig_mask) & ~ig_mask; if (total_size > format_limits.maxResourceSize) { - skip |= LogWarning(kVUID_Core_Image_InvalidFormatLimitsViolation, device, error_obj.location, + skip |= LogWarning("WARNING-Image-InvalidFormatLimitsViolation", device, error_obj.location, "resource size exceeds allowable maximum Image resource size = %" PRIu64 ", maximum resource size = %" PRIu64 " for format %s.", total_size, format_limits.maxResourceSize, string_VkFormat(pCreateInfo->format)); diff --git a/layers/core_checks/cc_image_layout.cpp b/layers/core_checks/cc_image_layout.cpp index 4b543ba82fc..d0f92a85381 100644 --- a/layers/core_checks/cc_image_layout.cpp +++ b/layers/core_checks/cc_image_layout.cpp @@ -117,7 +117,7 @@ bool CoreChecks::VerifyImageLayoutSubresource(const vvl::CommandBuffer &cb_state if (image_state.createInfo.tiling != VK_IMAGE_TILING_LINEAR) { // LAYOUT_GENERAL is allowed, but may not be performance optimal, flag as perf warning. const LogObjectList objlist(cb_state.commandBuffer(), image_state.Handle()); - skip |= LogPerformanceWarning(kVUID_Core_DrawState_InvalidImageLayout, objlist, loc, + skip |= LogPerformanceWarning("WARNING-ImageLayout-General", objlist, loc, "For optimal performance %s layout should be %s instead of GENERAL.", FormatHandle(image_state).c_str(), string_VkImageLayout(optimal_layout)); } @@ -266,7 +266,7 @@ bool CoreChecks::ValidateCmdBufImageLayouts(const Location &loc, const vvl::Comm for (auto index : sparse_container::range_view(intersected_range)) { const auto subresource = image_state->subresource_encoder.Decode(index); const LogObjectList objlist(cb_state.commandBuffer(), image_state->Handle()); - skip |= LogError(kVUID_Core_DrawState_InvalidImageLayout, objlist, loc, + skip |= LogError("UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout", objlist, loc, "command buffer %s expects %s (subresource: aspectMask 0x%x array layer %" PRIu32 ", mip level %" PRIu32 ") to be in layout %s--instead, current layout is %s.", FormatHandle(cb_state).c_str(), FormatHandle(*image_state).c_str(), subresource.aspectMask, @@ -504,7 +504,8 @@ bool CoreChecks::VerifyFramebufferAndRenderPassLayouts(const vvl::CommandBuffer if (render_pass_info->attachmentCount != framebuffer_info.attachmentCount) { const LogObjectList objlist(pRenderPassBegin->renderPass, framebuffer_state.framebuffer()); - skip |= LogError(kVUID_Core_DrawState_InvalidRenderpass, objlist, rp_begin_loc, + // VU bieng worked on at https://gitlab.khronos.org/vulkan/vulkan/-/issues/2267 + skip |= LogError("UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass", objlist, rp_begin_loc, "You cannot start a render pass using a framebuffer with a different number of attachments (%" PRIu32 " vs %" PRIu32 ").", render_pass_info->attachmentCount, framebuffer_info.attachmentCount); diff --git a/layers/core_checks/cc_queue.cpp b/layers/core_checks/cc_queue.cpp index 2d8e6c36a7e..31bb7e7d04f 100644 --- a/layers/core_checks/cc_queue.cpp +++ b/layers/core_checks/cc_queue.cpp @@ -453,7 +453,8 @@ bool CoreChecks::ValidateCommandBufferState(const vvl::CommandBuffer &cb_state, // Validate ONE_TIME_SUBMIT_BIT CB is not being submitted more than once if (const uint64_t submissions = cb_state.submitCount + current_submit_count; (cb_state.beginInfo.flags & VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT) && (submissions > 1)) { - skip |= LogError(kVUID_Core_DrawState_CommandBufferSingleSubmitViolation, cb_state.commandBuffer(), loc, + // VU being worked on https://gitlab.khronos.org/vulkan/vulkan/-/issues/2456 + skip |= LogError("UNASSIGNED-DrawState-CommandBufferSingleSubmitViolation", cb_state.commandBuffer(), loc, "%s recorded with VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT has been submitted %" PRIu64 " times.", FormatHandle(cb_state).c_str(), submissions); } diff --git a/layers/core_checks/cc_ray_tracing.cpp b/layers/core_checks/cc_ray_tracing.cpp index dc1696796a2..cd0556c37ca 100644 --- a/layers/core_checks/cc_ray_tracing.cpp +++ b/layers/core_checks/cc_ray_tracing.cpp @@ -969,7 +969,7 @@ bool CoreChecks::PreCallValidateCmdBuildAccelerationStructureNV(VkCommandBuffer } } if (dst_as_state != nullptr && !dst_as_state->update_scratch_memory_requirements_checked) { - skip |= LogWarning(kVUID_Core_CmdBuildAccelNV_NoUpdateMemReqQuery, dst, error_obj.location, + skip |= LogWarning("WARNING-vkCmdBuildAccelerationStructureNV-update-requirements", dst, error_obj.location, "Updating %s but vkGetAccelerationStructureMemoryRequirementsNV() " "has not been called for update scratch memory.", FormatHandle(dst_as_state->acceleration_structure()).c_str()); @@ -988,7 +988,7 @@ bool CoreChecks::PreCallValidateCmdBuildAccelerationStructureNV(VkCommandBuffer } } else { if (dst_as_state != nullptr && !dst_as_state->build_scratch_memory_requirements_checked) { - skip |= LogWarning(kVUID_Core_CmdBuildAccelNV_NoScratchMemReqQuery, dst, error_obj.location, + skip |= LogWarning("WARNING-vkCmdBuildAccelerationStructureNV-scratch-requirements", dst, error_obj.location, "Assigning scratch buffer to %s but " "vkGetAccelerationStructureMemoryRequirementsNV() has not been called for scratch memory.", FormatHandle(dst_as_state->acceleration_structure()).c_str()); diff --git a/layers/core_checks/cc_render_pass.cpp b/layers/core_checks/cc_render_pass.cpp index f9a6a4efda5..c436b434084 100644 --- a/layers/core_checks/cc_render_pass.cpp +++ b/layers/core_checks/cc_render_pass.cpp @@ -1124,7 +1124,7 @@ bool CoreChecks::CheckDependencyExists(const VkRenderPass renderpass, const uint if (!(FindDependency(subpass, sp.index, subpass_to_node, processed_nodes) || FindDependency(sp.index, subpass, subpass_to_node, processed_nodes))) { skip |= - LogError(kVUID_Core_DrawState_InvalidRenderpass, renderpass, attachment_loc, + LogError("UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass", renderpass, attachment_loc, "A dependency between subpasses %d and %d must exist but one is not specified.", subpass, sp.index); result = false; } @@ -1163,7 +1163,7 @@ bool CoreChecks::CheckPreserved(const VkRenderPass renderpass, const VkRenderPas } } if (!has_preserved) { - skip |= LogError(kVUID_Core_DrawState_InvalidRenderpass, renderpass, attachment_loc, + skip |= LogError("UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass", renderpass, attachment_loc, "Attachment %d is used by a later subpass and must be preserved in subpass %d.", attachment, index); } } @@ -2154,10 +2154,10 @@ bool CoreChecks::ValidateDependencies(const vvl::Framebuffer &framebuffer_state, } if (attachment_indices.count(attachment)) { - skip |= LogError(kVUID_Core_DrawState_InvalidRenderpass, render_pass_state.renderPass(), error_obj.location, - "Cannot use same attachment (%" PRIu32 ") as both color and depth output in same subpass (%" PRIu32 - ").", - attachment, i); + skip |= LogError( + "UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass", render_pass_state.renderPass(), error_obj.location, + "Cannot use same attachment (%" PRIu32 ") as both color and depth output in same subpass (%" PRIu32 ").", + attachment, i); } } } @@ -4208,8 +4208,9 @@ bool CoreChecks::PreCallValidateCreateFramebuffer(VkDevice device, const VkFrame // Verify that image memory is valid auto image_data = Get(ivci.image); + // VU being worked on https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5598 skip |= ValidateMemoryIsBoundToImage(LogObjectList(ivci.image), *image_data, attachment_loc, - kVUID_Core_Bound_Resource_FreedMemoryAccess); + "UNASSIGNED-VkFramebufferCreateInfo-BoundResourceFreedMemoryAccess"); // Verify that view only has a single mip level if (subresource_range.levelCount != 1) { diff --git a/layers/core_checks/cc_shader_interface.cpp b/layers/core_checks/cc_shader_interface.cpp index 4ae5192e42e..f94e3f256b3 100644 --- a/layers/core_checks/cc_shader_interface.cpp +++ b/layers/core_checks/cc_shader_interface.cpp @@ -99,7 +99,7 @@ bool CoreChecks::ValidateInterfaceVertexInput(const vvl::Pipeline &pipeline, con const auto shader_input = location_it.second.shader_input; if (attribute_input && !shader_input) { - skip |= LogPerformanceWarning(kVUID_Core_Shader_OutputNotConsumed, module_state.handle(), vi_loc, + skip |= LogPerformanceWarning("WARNING-Shader-OutputNotConsumed", module_state.handle(), vi_loc, "Vertex attribute at location %" PRIu32 " not consumed by vertex shader.", location); } else if (!attribute_input && shader_input) { skip |= LogError("VUID-VkGraphicsPipelineCreateInfo-Input-07904", module_state.handle(), @@ -552,7 +552,7 @@ bool CoreChecks::ValidateInterfaceBetweenStages(const spirv::Module &producer, c // Don't give any warning if maintenance4 with vectors if (!enabled_features.maintenance4 && (output_var->base_type.Opcode() != spv::OpTypeVector)) { const LogObjectList objlist(producer.handle(), consumer.handle()); - skip |= LogPerformanceWarning(kVUID_Core_Shader_OutputNotConsumed, objlist, create_info_loc, + skip |= LogPerformanceWarning("WARNING-Shader-OutputNotConsumed", objlist, create_info_loc, "(SPIR-V Interface) %s declared to output location %" PRIu32 " Component %" PRIu32 " but is not an Input declared by %s.", string_VkShaderStageFlagBits(producer_stage), location, component, diff --git a/layers/core_checks/cc_synchronization.cpp b/layers/core_checks/cc_synchronization.cpp index 0aa2ba639de..04b58ffe1ef 100644 --- a/layers/core_checks/cc_synchronization.cpp +++ b/layers/core_checks/cc_synchronization.cpp @@ -168,7 +168,7 @@ bool SemaphoreSubmitState::ValidateSignalSemaphore(const Location &signal_semaph objlist.add(other_queue); } skip |= core->LogError( - kVUID_Core_DrawState_QueueForwardProgress, objlist, signal_semaphore_loc, + "UNASSIGNED-vkQueueSubmit-QueueForwardProgress", objlist, signal_semaphore_loc, "(%s) is being signaled by %s, but it was previously signaled by %s and has not since been waited on", core->FormatHandle(semaphore).c_str(), core->FormatHandle(queue).c_str(), initiator.str().c_str()); } else { @@ -1289,7 +1289,7 @@ bool CoreChecks::PreCallValidateSetEvent(VkDevice device, VkEvent event, const E auto event_state = Get(event); if (event_state) { if (event_state->write_in_use) { - skip |= LogError(kVUID_Core_DrawState_QueueForwardProgress, event, error_obj.location.dot(Field::event), + skip |= LogError("UNASSIGNED-vkSetEvent-QueueForwardProgress", event, error_obj.location.dot(Field::event), "(%s) that is already in use by a command buffer.", FormatHandle(event).c_str()); } if (event_state->flags & VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR) { @@ -1534,7 +1534,7 @@ bool CoreChecks::ValidateBarriersToImages(const Location &barrier_loc, const vvl // Make sure layout is able to be transitioned, currently only presented shared presentable images are locked if (image_state->layout_locked) { // TODO: waiting for VUID https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5078 - skip |= LogError("VUID-Undefined", img_barrier.image, image_loc, + skip |= LogError("UNASSIGNED-barrier-shared-presentable", img_barrier.image, image_loc, "(%s) is a shared presentable and attempting to transition from layout %s to layout %s, but image has " "already been presented and cannot have its layout transitioned.", FormatHandle(img_barrier.image).c_str(), string_VkImageLayout(img_barrier.oldLayout), @@ -1815,7 +1815,7 @@ bool CoreChecks::ValidateAndUpdateQFOScoreboard(const debug_report_data *report_ if (!inserted.second && inserted.first->second != &cb_state) { // This is a duplication (but don't report duplicates from the same CB, as we do that at record time const LogObjectList objlist(cb_state.commandBuffer(), barrier.handle, inserted.first->second->commandBuffer()); - skip = LogWarning(TransferBarrier::ErrMsgDuplicateQFOInSubmit(), objlist, loc, + skip = LogWarning(TransferBarrier::DuplicateQFOInSubmit(), objlist, loc, "%s %s queue ownership of %s (%s), from srcQueueFamilyIndex %" PRIu32 " to dstQueueFamilyIndex %" PRIu32 " duplicates existing barrier submitted in this batch from %s.", TransferBarrier::BarrierName(), operation, TransferBarrier::HandleName(), @@ -1842,7 +1842,7 @@ bool CoreChecks::ValidateQueuedQFOTransferBarriers(const vvl::CommandBuffer &cb_ const QFOTransferBarrierSet &set_for_handle = set_it->second; const auto found = set_for_handle.find(release); if (found != set_for_handle.cend()) { - skip |= LogWarning(TransferBarrier::ErrMsgDuplicateQFOSubmitted(), cb_state.commandBuffer(), loc, + skip |= LogWarning(TransferBarrier::DuplicateQFOSubmitted(), cb_state.commandBuffer(), loc, "%s releasing queue ownership of %s (%s), from srcQueueFamilyIndex %" PRIu32 " to dstQueueFamilyIndex %" PRIu32 " duplicates existing barrier queued for execution, without intervening acquire operation.", @@ -1861,7 +1861,7 @@ 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::ErrMsgMissingQFOReleaseInSubmit(), cb_state.commandBuffer(), loc, + skip |= LogError(TransferBarrier::MissingQFOReleaseInSubmit(), cb_state.commandBuffer(), 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, @@ -1946,7 +1946,7 @@ bool CoreChecks::ValidateQFOTransferBarrierUniqueness(const Location &barrier_lo } } if (barrier_record != nullptr) { - skip |= LogWarning(TransferBarrier::ErrMsgDuplicateQFOInCB(), cb_state->commandBuffer(), barrier_loc, + skip |= LogWarning(TransferBarrier::DuplicateQFOInCB(), cb_state->commandBuffer(), barrier_loc, "%s queue ownership of %s (%s), from srcQueueFamilyIndex %" PRIu32 " to dstQueueFamilyIndex %" PRIu32 " duplicates existing barrier recorded in this command buffer.", transfer_type, handle_name, FormatHandle(barrier_record->handle).c_str(), diff --git a/layers/core_checks/cc_wsi.cpp b/layers/core_checks/cc_wsi.cpp index 2eb89ef34cd..99c326aedba 100644 --- a/layers/core_checks/cc_wsi.cpp +++ b/layers/core_checks/cc_wsi.cpp @@ -377,7 +377,7 @@ bool CoreChecks::ValidateCreateSwapchain(VkSwapchainCreateInfoKHR const *pCreate bool skip = false; VkSurfaceTransformFlagBitsKHR current_transform = surface_caps2.surfaceCapabilities.currentTransform; if ((pCreateInfo->preTransform & current_transform) != pCreateInfo->preTransform) { - skip |= LogPerformanceWarning(kVUID_Core_Swapchain_PreTransform, physical_device, create_info_loc.dot(Field::preTransform), + skip |= LogPerformanceWarning("WARNING-Swapchain-PreTransform", physical_device, create_info_loc.dot(Field::preTransform), "(%s) doesn't match the currentTransform (%s) returned by " "vkGetPhysicalDeviceSurfaceCapabilitiesKHR, the presentation engine will transform the image " "content as part of the presentation operation.", @@ -565,7 +565,8 @@ bool CoreChecks::ValidateCreateSwapchain(VkSwapchainCreateInfoKHR const *pCreate // Validate state for shared presentable case if (shared_present_mode) { if (!IsExtEnabled(device_extensions.vk_khr_shared_presentable_image)) { - if (LogError(kVUID_Core_DrawState_ExtensionNotEnabled, device, create_info_loc, + // TODO - https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2787 + if (LogError("UNASSIGNED-DrawState-ExtensionNotEnabled", device, create_info_loc, "called with presentMode %s which requires the VK_KHR_shared_presentable_image extension, which has not " "been enabled.", string_VkPresentModeKHR(present_mode))) { diff --git a/layers/core_checks/core_validation.h b/layers/core_checks/core_validation.h index f08a5a517bc..fdfed418915 100644 --- a/layers/core_checks/core_validation.h +++ b/layers/core_checks/core_validation.h @@ -1027,7 +1027,8 @@ class CoreChecks : public ValidationStateTracker { const ErrorObject& error_obj) const override; bool ValidateImageAspectMask(VkImage image, VkFormat format, VkImageAspectFlags aspect_mask, bool is_image_disjoint, - const Location& loc, const char* vuid = kVUID_Core_DrawState_InvalidImageAspect) const; + const Location& loc, + const char* vuid = "UNASSIGNED-CoreValidation-DrawState-InvalidImageAspect") const; bool ValidateCreateImageViewSubresourceRange(const vvl::Image& image_state, bool is_imageview_2d_type, const VkImageSubresourceRange& subresourceRange, const Location& loc) const; diff --git a/layers/error_message/logging.cpp b/layers/error_message/logging.cpp index dbd938255cd..54bf837e179 100644 --- a/layers/error_message/logging.cpp +++ b/layers/error_message/logging.cpp @@ -405,8 +405,7 @@ VKAPI_ATTR bool LogMsg(const debug_report_data *debug_data, VkFlags msg_flags, c } // Append the spec error text to the error message, unless it contains a word treated as special - if ((vuid_text.find("UNASSIGNED-") == std::string::npos) && (vuid_text.find(kVUIDUndefined) == std::string::npos) && - (vuid_text.rfind("SYNC-", 0) == std::string::npos) && (vuid_text.find("INTERNAL-ERROR-") == std::string::npos)) { + if ((vuid_text.find("VUID-") != std::string::npos)) { // Linear search makes no assumptions about the layout of the string table. This is not fast, but it does not need to be at // this point in the error reporting path uint32_t num_vuids = sizeof(vuid_spec_text) / sizeof(vuid_spec_text_pair); diff --git a/layers/error_message/validation_error_enums.h b/layers/error_message/validation_error_enums.h deleted file mode 100644 index e630b316021..00000000000 --- a/layers/error_message/validation_error_enums.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2015-2023 The Khronos Group Inc. - * Copyright (c) 2015-2023 Valve Corporation - * Copyright (c) 2015-2023 LunarG, Inc. - * Copyright (C) 2015-2023 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -// clang-format off - -[[maybe_unused]] static const char *kVUID_Core_Bound_Resource_FreedMemoryAccess = "UNASSIGNED-CoreValidation-BoundResourceFreedMemoryAccess"; - -[[maybe_unused]] static const char *kVUID_Core_DrawState_CommandBufferSingleSubmitViolation = "UNASSIGNED-CoreValidation-DrawState-CommandBufferSingleSubmitViolation"; -[[maybe_unused]] static const char *kVUID_Core_DrawState_ExtensionNotEnabled = "UNASSIGNED-CoreValidation-DrawState-ExtensionNotEnabled"; -[[maybe_unused]] static const char *kVUID_Core_DrawState_InvalidImageAspect = "UNASSIGNED-CoreValidation-DrawState-InvalidImageAspect"; -[[maybe_unused]] static const char *kVUID_Core_DrawState_InvalidImageLayout = "UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout"; -[[maybe_unused]] static const char *kVUID_Core_DrawState_InvalidRenderpass = "UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass"; -[[maybe_unused]] static const char *kVUID_Core_DrawState_QueueForwardProgress = "UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress"; - -[[maybe_unused]] static const char *kVUID_Core_BindImageMemory_Swapchain = "UNASSIGNED-CoreValidation-BindImageMemory-Swapchain"; - -// TODO - Need to be moved to Best Practice -[[maybe_unused]] static const char *kVUID_Core_Shader_OutputNotConsumed = "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"; -[[maybe_unused]] static const char *kVUID_Core_Swapchain_PriorCount = "UNASSIGNED-CoreValidation-SwapchainPriorCount"; -[[maybe_unused]] static const char *kVUID_Core_Swapchain_PreTransform = "UNASSIGNED-CoreValidation-SwapchainPreTransform"; -[[maybe_unused]] static const char *kVUID_Core_Image_InvalidFormatLimitsViolation = "UNASSIGNED-CoreValidation-Image-InvalidFormatLimitsViolation"; -[[maybe_unused]] static const char *kVUID_Core_CmdBuildAccelNV_NoScratchMemReqQuery = "UNASSIGNED-CoreValidation-vkCmdBuildAccelerationStructureNV-scratch-requirements"; -[[maybe_unused]] static const char *kVUID_Core_CmdBuildAccelNV_NoUpdateMemReqQuery = "UNASSIGNED-CoreValidation-vkCmdBuildAccelerationStructureNV-update-requirements"; - -// These are UNASSIGNED VUID won't have a proper spec VU for special reasons (see where used for more info) -[[maybe_unused]] static const char *kVUID_Core_invalidDepthStencilFormat = "UNASSIGNED-CoreValidation-depthStencil-format"; - -// clang-format on - -#undef DECORATE_UNUSED diff --git a/layers/gpu_validation/debug_printf.cpp b/layers/gpu_validation/debug_printf.cpp index 67629cf9eef..6ff334072bc 100644 --- a/layers/gpu_validation/debug_printf.cpp +++ b/layers/gpu_validation/debug_printf.cpp @@ -390,10 +390,10 @@ void debug_printf::Validator::AnalyzeAndGenerateMessages(VkCommandBuffer command pipeline_handle, shader_object_handle, buffer_info.pipeline_bind_point, operation_index, common_message); UtilGenerateSourceMessages(pgm, &debug_output_buffer[index], true, filename_message, source_message); if (use_stdout) { - std::cout << "UNASSIGNED-DEBUG-PRINTF " << common_message.c_str() << " " + std::cout << "WARNING-DEBUG-PRINTF " << common_message.c_str() << " " << shader_message.str().c_str() << " " << filename_message.c_str() << " " << source_message.c_str(); } else { - LogInfo("UNASSIGNED-DEBUG-PRINTF", queue, loc, "%s %s %s%s", common_message.c_str(), + LogInfo("WARNING-DEBUG-PRINTF", queue, loc, "%s %s %s%s", common_message.c_str(), shader_message.str().c_str(), filename_message.c_str(), source_message.c_str()); } } else { @@ -401,13 +401,13 @@ void debug_printf::Validator::AnalyzeAndGenerateMessages(VkCommandBuffer command std::cout << shader_message.str(); } else { // Don't let LogInfo process any '%'s in the string - LogInfo("UNASSIGNED-DEBUG-PRINTF", device, loc, "%s", shader_message.str().c_str()); + LogInfo("WARNING-DEBUG-PRINTF", device, loc, "%s", shader_message.str().c_str()); } } index += debug_record->size; } if ((index - spvtools::kDebugOutputDataOffset) != expect) { - LogWarning("UNASSIGNED-DEBUG-PRINTF", device, loc, + LogWarning("WARNING-DEBUG-PRINTF", device, loc, "WARNING - Debug Printf message was truncated, likely due to a buffer size that was too small for the message"); } memset(debug_output_buffer, 0, 4 * (debug_output_buffer[spvtools::kDebugOutputSizeOffset] + spvtools::kDebugOutputDataOffset)); diff --git a/layers/gpu_validation/gpu_image_layout.cpp b/layers/gpu_validation/gpu_image_layout.cpp index 047dfc1003a..db979756eb7 100644 --- a/layers/gpu_validation/gpu_image_layout.cpp +++ b/layers/gpu_validation/gpu_image_layout.cpp @@ -709,7 +709,7 @@ bool gpuav::Validator::VerifyImageLayoutRange(const vvl::CommandBuffer &cb_state for (auto index : sparse_container::range_view(intersected_range)) { const auto subresource = image_state.subresource_encoder.Decode(index); const LogObjectList objlist(cb_state.commandBuffer(), image_state.Handle()); - skip |= LogError(objlist, kVUID_Core_DrawState_InvalidImageLayout, + skip |= LogError(objlist, "UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout", "%s command buffer %s expects %s (subresource: aspectMask 0x%x array layer %" PRIu32 ", mip level %" PRIu32 ") " diff --git a/layers/gpu_validation/gpu_record.cpp b/layers/gpu_validation/gpu_record.cpp index c61c4e7180f..f45002576a8 100644 --- a/layers/gpu_validation/gpu_record.cpp +++ b/layers/gpu_validation/gpu_record.cpp @@ -242,7 +242,7 @@ void gpuav::Validator::PostCallRecordGetPhysicalDeviceProperties(VkPhysicalDevic if (device_props->limits.maxBoundDescriptorSets > 1) { device_props->limits.maxBoundDescriptorSets -= 1; } else { - LogWarning("UNASSIGNED-GPU-Assisted Validation Setup Error.", physicalDevice, record_obj.location, + LogWarning("WARNING-GPU-Assisted-Validation-Setup", physicalDevice, record_obj.location, "Unable to reserve descriptor binding slot on a device with only one slot."); } } @@ -258,7 +258,7 @@ void gpuav::Validator::PostCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevi if (device_props2->properties.limits.maxBoundDescriptorSets > 1) { device_props2->properties.limits.maxBoundDescriptorSets -= 1; } else { - LogWarning("UNASSIGNED-GPU-Assisted Validation Setup Error.", physicalDevice, record_obj.location, + LogWarning("WARNING-GPU-Assisted-Validation-Setup", physicalDevice, record_obj.location, "Unable to reserve descriptor binding slot on a device with only one slot."); } } diff --git a/layers/gpu_validation/gpu_setup.cpp b/layers/gpu_validation/gpu_setup.cpp index 27e5a5d4878..fd3279eaf64 100644 --- a/layers/gpu_validation/gpu_setup.cpp +++ b/layers/gpu_validation/gpu_setup.cpp @@ -127,7 +127,7 @@ void gpuav::Validator::CreateDevice(const VkDeviceCreateInfo *pCreateInfo) { if ((IsExtEnabled(device_extensions.vk_ext_buffer_device_address) || IsExtEnabled(device_extensions.vk_khr_buffer_device_address)) && !shaderInt64) { - LogWarning("UNASSIGNED-GPU-Assisted Validation Warning", device, loc, + LogWarning("WARNING-GPU-Assisted-Validation", device, loc, "shaderInt64 feature is not available. No buffer device address checking will be attempted"); } buffer_device_address_enabled = ((IsExtEnabled(device_extensions.vk_ext_buffer_device_address) || @@ -158,7 +158,7 @@ void gpuav::Validator::CreateDevice(const VkDeviceCreateInfo *pCreateInfo) { } if (IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { - LogWarning("UNASSIGNED-GPU-Assisted Validation Warning", device, loc, + LogWarning("WARNING-GPU-Assisted-Validation", device, loc, "VK_EXT_descriptor_buffer is enabled, but GPU-AV does not currently support validation of descriptor buffers. " "Use of descriptor buffers will result in no descriptor checking"); } @@ -167,13 +167,13 @@ void gpuav::Validator::CreateDevice(const VkDeviceCreateInfo *pCreateInfo) { if (gpuav_settings.validate_descriptors && !force_buffer_device_address) { gpuav_settings.validate_descriptors = false; - LogWarning("UNASSIGNED-GPU-Assisted Validation Warning", device, loc, + LogWarning("WARNING-GPU-Assisted-Validation", device, loc, "Buffer Device Address + feature is not available. No descriptor checking will be attempted"); } if (gpuav_settings.validate_indirect_buffer && (phys_dev_props.limits.maxPushConstantsSize < 4 * sizeof(uint32_t))) { gpuav_settings.validate_indirect_buffer = false; - LogWarning("UNASSIGNED-GPU-Assisted Validation Warning", device, loc, + LogWarning("WARNING-GPU-Assisted-Validation", device, loc, "Device does not support the minimum range of push constants (32 bytes). No indirect buffer checking will be " "attempted"); } @@ -271,7 +271,7 @@ void gpuav::Validator::CreateAccelerationStructureBuildValidationState(const VkD } } if (!graphics_queue_exists) { - LogWarning("UNASSIGNED-GPU-Assisted Validation Warning", device, loc, "No queue that supports graphics, GPU-AV aborted."); + LogWarning("WARNING-GPU-Assisted-Validation", device, loc, "No queue that supports graphics, GPU-AV aborted."); aborted = true; return; } @@ -575,7 +575,7 @@ void gpuav::Validator::CreateAccelerationStructureBuildValidationState(const VkD if (result == VK_SUCCESS) { as_validation_state.initialized = true; - LogInfo("UNASSIGNED-GPU-Assisted Validation.", device, loc, "Acceleration Structure Building GPU Validation Enabled."); + LogInfo("WARNING-GPU-Assisted-Validation", device, loc, "Acceleration Structure Building GPU Validation Enabled."); } else { aborted = true; } diff --git a/layers/object_tracker/object_lifetime_validation.h b/layers/object_tracker/object_lifetime_validation.h index 7ca1f2cdfa0..a71fc6645b2 100644 --- a/layers/object_tracker/object_lifetime_validation.h +++ b/layers/object_tracker/object_lifetime_validation.h @@ -16,13 +16,6 @@ * limitations under the License. */ -// clang-format off -[[maybe_unused]] static const char *kVUID_ObjectTracker_Info = "UNASSIGNED-ObjectTracker-Info"; -[[maybe_unused]] static const char *kVUID_ObjectTracker_InternalError = "UNASSIGNED-ObjectTracker-InternalError"; -[[maybe_unused]] static const char *kVUID_ObjectTracker_ObjectLeak = "UNASSIGNED-ObjectTracker-ObjectLeak"; -[[maybe_unused]] static const char *kVUID_ObjectTracker_UnknownObject = "UNASSIGNED-ObjectTracker-UnknownObject"; -// clang-format on - extern uint64_t object_track_index; // Object Status -- used to track state of individual objects @@ -88,7 +81,8 @@ class ObjectLifetimes : public ValidationObject { if (!inserted) { // The object should not already exist. If we couldn't add it to the map, there was probably // a race condition in the app. Report an error and move on. - (void)LogError(kVUID_ObjectTracker_Info, object, loc, + // TODO should this be an error? https://gitlab.khronos.org/vulkan/vulkan/-/issues/3616 + (void)LogError("UNASSIGNED-ObjectTracker-Insert", object, loc, "Couldn't insert %s Object 0x%" PRIxLEAST64 ", already existed. This should not happen and may indicate a " "race condition in the application.", diff --git a/layers/object_tracker/object_tracker_utils.cpp b/layers/object_tracker/object_tracker_utils.cpp index 3d90a3b2d55..fb4387d0522 100644 --- a/layers/object_tracker/object_tracker_utils.cpp +++ b/layers/object_tracker/object_tracker_utils.cpp @@ -104,7 +104,7 @@ void ObjectLifetimes::DestroyObjectSilently(uint64_t object, VulkanObjectType ob // We've already checked that the object exists. If we couldn't find and atomically remove it // from the map, there must have been a race condition in the app. Report an error and move on. const Location loc(Func::vkDestroyDevice); - (void)LogError(kVUID_ObjectTracker_Info, device, loc, + (void)LogError("UNASSIGNED-ObjectTracker-Destroy", device, loc, "Couldn't destroy %s Object 0x%" PRIxLEAST64 ", not found. This should not happen and may indicate a race condition in the application.", object_string[object_type], object); @@ -403,9 +403,9 @@ bool ObjectLifetimes::PreCallValidateDestroyInstance(VkInstance instance, const VkDevice device = reinterpret_cast(node->handle); VkDebugReportObjectTypeEXT debug_object_type = get_debug_report_enum[node->object_type]; - skip |= LogError(kVUID_ObjectTracker_ObjectLeak, instance, error_obj.location, - "OBJ ERROR : %s object %s has not been destroyed.", string_VkDebugReportObjectTypeEXT(debug_object_type), - FormatHandle(ObjTrackStateTypedHandle(*node)).c_str()); + skip |= + LogError("VUID-vkDestroyInstance-instance-00629", instance, error_obj.location, "%s object %s has not been destroyed.", + string_VkDebugReportObjectTypeEXT(debug_object_type), FormatHandle(ObjTrackStateTypedHandle(*node)).c_str()); // Throw errors if any device objects belonging to this instance have not been destroyed auto device_layer_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); diff --git a/layers/state_tracker/fence_state.cpp b/layers/state_tracker/fence_state.cpp index a41082d621b..e08002107e4 100644 --- a/layers/state_tracker/fence_state.cpp +++ b/layers/state_tracker/fence_state.cpp @@ -54,8 +54,9 @@ void vvl::Fence::NotifyAndWait(const Location &loc) { if (waiter.valid()) { auto result = waiter.wait_until(GetCondWaitTimeout()); if (result != std::future_status::ready) { - dev_data_.LogError("UNASSIGNED-VkFence-state-timeout", Handle(), loc, - "Timeout waiting for fence state to update. This is most likely a validation bug."); + dev_data_.LogError( + "INTERNAL-ERROR-VkFence-state-timeout", Handle(), loc, + "The Validation Layers hit a timeout waiting for fence state to update (this is most likely a validation bug)."); } } } diff --git a/layers/state_tracker/queue_state.cpp b/layers/state_tracker/queue_state.cpp index ca88ae73307..6be6cd3f93f 100644 --- a/layers/state_tracker/queue_state.cpp +++ b/layers/state_tracker/queue_state.cpp @@ -111,10 +111,11 @@ void vvl::Queue::NotifyAndWait(const Location &loc, uint64_t until_seq) { auto waiter = Wait(until_seq); auto result = waiter.wait_until(GetCondWaitTimeout()); if (result != std::future_status::ready) { - dev_data_.LogError("UNASSIGNED-VkQueue-state-timeout", Handle(), loc, - "Timeout waiting for queue state to update. This is most likely a validation bug." - " seq=%" PRIu64 " until=%" PRIu64, - seq_.load(), until_seq); + dev_data_.LogError( + "INTERNAL-ERROR-VkQueue-state-timeout", Handle(), loc, + "The Validation Layers hit a timeout waiting for queue state to update (this is most likely a validation bug)." + " seq=%" PRIu64 " until=%" PRIu64, + seq_.load(), until_seq); } } diff --git a/layers/state_tracker/semaphore_state.cpp b/layers/state_tracker/semaphore_state.cpp index eb4be8b10c3..e907d433cde 100644 --- a/layers/state_tracker/semaphore_state.cpp +++ b/layers/state_tracker/semaphore_state.cpp @@ -177,8 +177,9 @@ void vvl::Semaphore::Retire(vvl::Queue *current_queue, const Location &loc, uint guard.unlock(); auto result = waiter.wait_until(GetCondWaitTimeout()); if (result != std::future_status::ready) { - dev_data_.LogError("UNASSIGNED-VkSemaphore-state-timeout", Handle(), loc, - "Timeout waiting for timeline semaphore state to update. This is most likely a validation bug." + dev_data_.LogError("INTERNAL-ERROR-VkSemaphore-state-timeout", Handle(), loc, + "The Validation Layers hit a timeout waiting for timeline semaphore state to update (this is most " + "likely a validation bug)." " completed_.payload=%" PRIu64 " wait_payload=%" PRIu64, completed_.payload, payload); } diff --git a/layers/state_tracker/state_tracker.h b/layers/state_tracker/state_tracker.h index ef628ddbca6..e98eeaa3285 100644 --- a/layers/state_tracker/state_tracker.h +++ b/layers/state_tracker/state_tracker.h @@ -20,7 +20,6 @@ #pragma once #include "generated/chassis.h" -#include "error_message/validation_error_enums.h" #include "state_tracker/device_state.h" #include "state_tracker/queue_state.h" #include "state_tracker/query_state.h" diff --git a/layers/stateless/sl_descriptor.cpp b/layers/stateless/sl_descriptor.cpp index a7668ecfcf6..b96563a63bb 100644 --- a/layers/stateless/sl_descriptor.cpp +++ b/layers/stateless/sl_descriptor.cpp @@ -313,7 +313,8 @@ bool StatelessValidation::manual_PreCallValidateCreateSampler(VkDevice device, c if (pCreateInfo->borderColor == VK_BORDER_COLOR_INT_CUSTOM_EXT || pCreateInfo->borderColor == VK_BORDER_COLOR_FLOAT_CUSTOM_EXT) { if (!IsExtEnabled(device_extensions.vk_ext_custom_border_color)) { - skip |= LogError(kVUID_PVError_ExtensionNotEnabled, device, create_info_loc.dot(Field::borderColor), + // TODO - https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2787 + skip |= LogError("UNASSIGNED-DrawState-ExtensionNotEnabled", device, create_info_loc.dot(Field::borderColor), "is %s but %s is not enabled.", string_VkBorderColor(pCreateInfo->borderColor), VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); } @@ -570,16 +571,17 @@ bool StatelessValidation::manual_PreCallValidateCreateDescriptorSetLayout(VkDevi // TODO - Remove these 2 extension checks once the enum-to-extensions logic is generated // mostly likely will fail test trying to hit these + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2787 if (pCreateInfo->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR && !IsExtEnabled(device_extensions.vk_khr_push_descriptor)) { - skip |= LogError(kVUID_Core_DrawState_ExtensionNotEnabled, device, error_obj.location, + skip |= LogError("UNASSIGNED-DrawState-ExtensionNotEnabled", device, error_obj.location, "Attempted to use %s in %s but its required extension %s has not been enabled.\n", "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR", "VkDescriptorSetLayoutCreateInfo::flags", VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } if (pCreateInfo->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { - skip |= LogError(kVUID_Core_DrawState_ExtensionNotEnabled, device, error_obj.location, + skip |= LogError("UNASSIGNED-DrawState-ExtensionNotEnabled", device, error_obj.location, "Attemped to use %s in %s but its required extension %s has not been enabled.\n", "VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT", "VkDescriptorSetLayoutCreateInfo::flags", VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME); diff --git a/layers/stateless/sl_pipeline.cpp b/layers/stateless/sl_pipeline.cpp index c34b8389f68..bfa5538256b 100644 --- a/layers/stateless/sl_pipeline.cpp +++ b/layers/stateless/sl_pipeline.cpp @@ -506,7 +506,8 @@ bool StatelessValidation::manual_PreCallValidateCreateGraphicsPipelines( if (vkuFormatIsDepthOrStencil(vertex_attrib_desc.format)) { // Should never hopefully get here, but there are known driver advertising the wrong feature flags // see https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/4849 - skip |= LogError(kVUID_Core_invalidDepthStencilFormat, device, attribute_loc.dot(Field::format), + skip |= LogError("UNASSIGNED-VkVertexInputAttributeDescription-depthStencil-format", device, + attribute_loc.dot(Field::format), "is a depth/stencil format (%s) but depth/stencil formats do not have a defined sizes for " "alignment, replace with a color format.", string_VkFormat(vertex_attrib_desc.format)); diff --git a/layers/thread_tracker/thread_safety_validation.h b/layers/thread_tracker/thread_safety_validation.h index 5250df1aeb9..d2d72ab0e06 100644 --- a/layers/thread_tracker/thread_safety_validation.h +++ b/layers/thread_tracker/thread_safety_validation.h @@ -42,10 +42,6 @@ static_assert(std::is_same::val "Mismatched non-dispatchable handle handle, expected uint64_t."); #endif -[[maybe_unused]] static const char *kVUID_Threading_Info = "UNASSIGNED-Threading-Info"; -[[maybe_unused]] static const char *kVUID_Threading_MultipleThreads = "UNASSIGNED-Threading-MultipleThreads"; -[[maybe_unused]] static const char *kVUID_Threading_SingleThreadReuse = "UNASSIGNED-Threading-SingleThreadReuse"; - // Modern CPUs have 64 or 128-byte cache line sizes (Apple M1 has 128-byte cache line size). // Use alignment of 64 bytes (instead of 128) to prioritize using less memory and decrease // cache pressure. @@ -121,7 +117,7 @@ class counter { if (iter != object_table.end()) { return iter->second; } else { - object_data->LogError(kVUID_Threading_Info, object, loc, + object_data->LogError("UNASSIGNED-Threading-Info", object, loc, "Couldn't find %s Object 0x%" PRIxLEAST64 ". This should not happen and may indicate a bug in the application.", object_string[object_type], (uint64_t)(object)); @@ -229,7 +225,8 @@ class counter { void HandleErrorOnWrite(const std::shared_ptr &use_data, T object, const Location& loc) { const std::thread::id tid = std::this_thread::get_id(); const std::string error_message = GetErrorMessage(tid, use_data->thread.load(std::memory_order_relaxed)); - const bool skip = object_data->LogError(kVUID_Threading_MultipleThreads, object, loc, "%s", error_message.c_str()); + const bool skip = + object_data->LogError("UNASSIGNED-Threading-MultipleThreads-Write", object, loc, "%s", error_message.c_str()); if (skip) { // Wait for thread-safe access to object instead of skipping call. use_data->WaitForObjectIdle(true); @@ -245,7 +242,8 @@ class counter { const std::thread::id tid = std::this_thread::get_id(); // There is a writer of the object. const auto error_message = GetErrorMessage(tid, use_data->thread.load(std::memory_order_relaxed)); - const bool skip = object_data->LogError(kVUID_Threading_MultipleThreads, object, loc, "%s", error_message.c_str()); + const bool skip = + object_data->LogError("UNASSIGNED-Threading-MultipleThreads-Read", object, loc, "%s", error_message.c_str()); if (skip) { // Wait for thread-safe access to object instead of skipping call. use_data->WaitForObjectIdle(false); diff --git a/layers/vulkan/generated/chassis.cpp b/layers/vulkan/generated/chassis.cpp index 4916ee2075d..b78b7bb5b02 100644 --- a/layers/vulkan/generated/chassis.cpp +++ b/layers/vulkan/generated/chassis.cpp @@ -261,19 +261,18 @@ void OutputLayerStatusInfo(ValidationObject* context) { Location loc(vvl::Func::vkCreateInstance); // Output layer status information message context->LogInfo( - "UNASSIGNED-CreateInstance-status-message", context->instance, loc, + "WARNING-CreateInstance-status-message", context->instance, loc, "Khronos Validation Layer Active:\n Settings File: %s\n Current Enables: %s.\n Current Disables: %s.\n", settings_status.c_str(), list_of_enables.c_str(), list_of_disables.c_str()); // Create warning message if user is running debug layers. #ifndef NDEBUG - context->LogPerformanceWarning( - "UNASSIGNED-CreateInstance-debug-warning", context->instance, loc, - "VALIDATION LAYERS WARNING: Using debug builds of the validation layers *will* adversely affect performance."); + context->LogPerformanceWarning("WARNING-CreateInstance-debug-warning", context->instance, loc, + "Using debug builds of the validation layers *will* adversely affect performance."); #endif if (!context->fine_grained_locking) { context->LogPerformanceWarning( - "UNASSIGNED-CreateInstance-locking-warning", context->instance, loc, + "WARNING-CreateInstance-locking-warning", context->instance, loc, "Fine-grained locking is disabled, this will adversely affect performance of multithreaded applications."); } } diff --git a/scripts/generators/layer_chassis_generator.py b/scripts/generators/layer_chassis_generator.py index bd668859d0b..9c44a3354a4 100644 --- a/scripts/generators/layer_chassis_generator.py +++ b/scripts/generators/layer_chassis_generator.py @@ -984,19 +984,19 @@ def generateSource(self): Location loc(vvl::Func::vkCreateInstance); // Output layer status information message - context->LogInfo("UNASSIGNED-CreateInstance-status-message", context->instance, loc, + context->LogInfo("WARNING-CreateInstance-status-message", context->instance, loc, "Khronos Validation Layer Active:\\n Settings File: %s\\n Current Enables: %s.\\n Current Disables: %s.\\n", settings_status.c_str(), list_of_enables.c_str(), list_of_disables.c_str()); // Create warning message if user is running debug layers. #ifndef NDEBUG context->LogPerformanceWarning( - "UNASSIGNED-CreateInstance-debug-warning", context->instance, loc, - "VALIDATION LAYERS WARNING: Using debug builds of the validation layers *will* adversely affect performance."); + "WARNING-CreateInstance-debug-warning", context->instance, loc, + "Using debug builds of the validation layers *will* adversely affect performance."); #endif if (!context->fine_grained_locking) { context->LogPerformanceWarning( - "UNASSIGNED-CreateInstance-locking-warning", context->instance, loc, + "WARNING-CreateInstance-locking-warning", context->instance, loc, "Fine-grained locking is disabled, this will adversely affect performance of multithreaded applications."); } } diff --git a/scripts/vk_validation_stats.py b/scripts/vk_validation_stats.py index ee94eeed298..a8e224beeb5 100755 --- a/scripts/vk_validation_stats.py +++ b/scripts/vk_validation_stats.py @@ -546,7 +546,6 @@ def main(argv): unassigned_vuid_files = [repo_relative(path) for path in [ 'layers/best_practices/best_practices_error_enums.h', 'layers/stateless/stateless_validation.h', - 'layers/error_message/validation_error_enums.h', 'layers/object_tracker/object_lifetime_validation.h' ]] diff --git a/tests/unit/best_practices.cpp b/tests/unit/best_practices.cpp index c7b0fca3ab9..91494d10aa1 100644 --- a/tests/unit/best_practices.cpp +++ b/tests/unit/best_practices.cpp @@ -1186,8 +1186,7 @@ TEST_F(VkBestPracticesLayerTest, CreatePipelineVsFsTypeMismatchArraySize) { const auto set_info = [&](CreatePipelineHelper &helper) { helper.shader_stages_ = {vs.GetStageCreateInfo(), fs.GetStageCreateInfo()}; }; - CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, - "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"); + CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, "WARNING-Shader-OutputNotConsumed"); } TEST_F(VkBestPracticesLayerTest, WorkgroupSizeDeprecated) { diff --git a/tests/unit/command.cpp b/tests/unit/command.cpp index b965dff7de8..ab0d6e65245 100644 --- a/tests/unit/command.cpp +++ b/tests/unit/command.cpp @@ -247,7 +247,7 @@ TEST_F(NegativeCommand, Sync2SecondaryCommandbufferAsPrimary) { } TEST_F(NegativeCommand, CommandBufferTwoSubmits) { - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-CommandBufferSingleSubmitViolation"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-DrawState-CommandBufferSingleSubmitViolation"); RETURN_IF_SKIP(Init()); InitRenderTarget(); @@ -286,7 +286,7 @@ TEST_F(NegativeCommand, Sync2CommandBufferTwoSubmits) { GetPhysicalDeviceFeatures2(sync2_features); RETURN_IF_SKIP(InitState(nullptr, &sync2_features)); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-CommandBufferSingleSubmitViolation"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-DrawState-CommandBufferSingleSubmitViolation"); InitRenderTarget(); // We luck out b/c by default the framework creates CB w/ the @@ -1017,7 +1017,7 @@ TEST_F(NegativeCommand, SimultaneousUseOneShot) { vk::CmdSetViewport(cmd_bufs[1], 0, 1, &viewport); vk::EndCommandBuffer(cmd_bufs[1]); m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-vkQueueSubmit-pCommandBuffers-00071"); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-CommandBufferSingleSubmitViolation"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-DrawState-CommandBufferSingleSubmitViolation"); vk::QueueSubmit(m_default_queue, 1, &submit_info, VK_NULL_HANDLE); m_errorMonitor->VerifyFound(); vk::QueueWaitIdle(m_default_queue); diff --git a/tests/unit/descriptor_indexing.cpp b/tests/unit/descriptor_indexing.cpp index 8c0f2800b11..6d460a76df8 100644 --- a/tests/unit/descriptor_indexing.cpp +++ b/tests/unit/descriptor_indexing.cpp @@ -223,7 +223,7 @@ TEST_F(NegativeDescriptorIndexing, SetLayoutWithoutExtension) { VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-ExtensionNotEnabled"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-DrawState-ExtensionNotEnabled"); vk::CreateDescriptorSetLayout(m_device->handle(), &ds_layout_ci, nullptr, &ds_layout); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/descriptors.cpp b/tests/unit/descriptors.cpp index fe7fd1579de..50912be9e27 100644 --- a/tests/unit/descriptors.cpp +++ b/tests/unit/descriptors.cpp @@ -1215,7 +1215,7 @@ TEST_F(NegativeDescriptors, DescriptorImageUpdateNoMemoryBound) { // Break memory binding and attempt update image.memory().destroy(); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-BoundResourceFreedMemoryAccess"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-VkDescriptorImageInfo-BoundResourceFreedMemoryAccess"); descriptor_set.UpdateDescriptorSets(); m_errorMonitor->VerifyFound(); } @@ -5298,7 +5298,7 @@ TEST_F(NegativeDescriptors, DescriptorTypeNotInPool) { if (result != VK_ERROR_OUT_OF_POOL_MEMORY) { GTEST_SKIP() << "Does not return expected VK_ERROR_OUT_OF_POOL_MEMORY"; } - m_errorMonitor->SetDesiredFailureMsg(kWarningBit, "UNASSIGNED-CoreValidation-AllocateDescriptorSets-WrongType"); + m_errorMonitor->SetDesiredFailureMsg(kWarningBit, "WARNING-CoreValidation-AllocateDescriptorSets-WrongType"); vk::AllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_set); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/image.cpp b/tests/unit/image.cpp index 781b4d4bed9..e00d7812a55 100644 --- a/tests/unit/image.cpp +++ b/tests/unit/image.cpp @@ -18,7 +18,6 @@ #include "../framework/pipeline_helper.h" #include "../framework/descriptor_helper.h" #include "utils/vk_layer_utils.h" -#include "error_message/validation_error_enums.h" TEST_F(NegativeImage, UsageBits) { TEST_DESCRIPTION( @@ -6108,7 +6107,7 @@ TEST_F(NegativeImage, ComputeImageLayout) { vk::CmdDispatch(cmd.handle(), 1, 1, 1); cmd.end(); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, kVUID_Core_DrawState_InvalidImageLayout); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout"); cmd.QueueCommandBuffer(false); m_errorMonitor->VerifyFound(); } @@ -6122,7 +6121,7 @@ TEST_F(NegativeImage, ComputeImageLayout) { vk::CmdDispatchBaseKHR(cmd.handle(), 0, 0, 0, 1, 1, 1); cmd.end(); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, kVUID_Core_DrawState_InvalidImageLayout); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout"); cmd.QueueCommandBuffer(false); m_errorMonitor->VerifyFound(); } @@ -6167,7 +6166,7 @@ TEST_F(NegativeImage, ComputeImageLayout11) { vk::CmdDispatchBase(m_commandBuffer->handle(), 0, 0, 0, 1, 1, 1); m_commandBuffer->end(); - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, kVUID_Core_DrawState_InvalidImageLayout); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout"); m_commandBuffer->QueueCommandBuffer(false); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/instanceless.cpp b/tests/unit/instanceless.cpp index ebdd8a89d81..3566a9d6916 100644 --- a/tests/unit/instanceless.cpp +++ b/tests/unit/instanceless.cpp @@ -262,8 +262,7 @@ TEST_F(NegativeInstanceless, DISABLED_DestroyInstanceHandleLeak) { VkDevice leaked_device; ASSERT_EQ(VK_SUCCESS, vk::CreateDevice(physical_device, &dci, nullptr, &leaked_device)); - // VUID-vkDestroyInstance-instance-00629 - Monitor().SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-ObjectTracker-ObjectLeak"); + Monitor().SetDesiredFailureMsg(kErrorBit, "VUID-vkDestroyInstance-instance-00629"); vk::DestroyInstance(instance, nullptr); Monitor().VerifyFound(); } diff --git a/tests/unit/object_lifetime.cpp b/tests/unit/object_lifetime.cpp index cad95cefbab..75a51b48e86 100644 --- a/tests/unit/object_lifetime.cpp +++ b/tests/unit/object_lifetime.cpp @@ -570,7 +570,7 @@ TEST_F(NegativeObjectLifetime, FramebufferAttachmentMemoryFreed) { // Introduce error: // Free the attachment image memory, then create framebuffer. delete image_memory; - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-BoundResourceFreedMemoryAccess"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-VkFramebufferCreateInfo-BoundResourceFreedMemoryAccess"); vk::CreateFramebuffer(m_device->device(), &fci, nullptr, &fb); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/others.cpp b/tests/unit/others.cpp index 81e048d0f31..244dd9a0edb 100644 --- a/tests/unit/others.cpp +++ b/tests/unit/others.cpp @@ -1223,7 +1223,7 @@ TEST_F(VkLayerTest, LeakAnObject) { // There's no way we can destroy the fence at this point. Even though DestroyDevice failed, the loader has already removed // references to the device m_errorMonitor->SetUnexpectedError("VUID-vkDestroyDevice-device-05137"); - m_errorMonitor->SetUnexpectedError("UNASSIGNED-ObjectTracker-ObjectLeak"); + m_errorMonitor->SetUnexpectedError("VUID-vkDestroyInstance-instance-00629"); } TEST_F(VkLayerTest, LeakABuffer) { @@ -1274,7 +1274,7 @@ TEST_F(VkLayerTest, LeakABuffer) { // There's no way we can destroy the buffer at this point. // Even though DestroyDevice failed, the loader has already removed references to the device m_errorMonitor->SetUnexpectedError("VUID-vkDestroyDevice-device-05137"); - m_errorMonitor->SetUnexpectedError("UNASSIGNED-ObjectTracker-ObjectLeak"); + m_errorMonitor->SetUnexpectedError("VUID-vkDestroyInstance-instance-00629"); } TEST_F(VkLayerTest, UseObjectWithWrongDevice) { @@ -1828,7 +1828,7 @@ TEST_F(VkLayerTest, ResetEventThenSet) { vk::QueueSubmit(queue, 1, &submit_info, VK_NULL_HANDLE); } { - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "that is already in use by a command buffer."); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-vkSetEvent-QueueForwardProgress"); vk::SetEvent(m_device->device(), event.handle()); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/push_descriptor.cpp b/tests/unit/push_descriptor.cpp index bc3185e887a..1df61d2b9ed 100644 --- a/tests/unit/push_descriptor.cpp +++ b/tests/unit/push_descriptor.cpp @@ -344,7 +344,7 @@ TEST_F(NegativePushDescriptor, SetLayoutWithoutExtension) { VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-CoreValidation-DrawState-ExtensionNotEnabled"); + m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "UNASSIGNED-DrawState-ExtensionNotEnabled"); vk::CreateDescriptorSetLayout(m_device->handle(), &ds_layout_ci, nullptr, &ds_layout); m_errorMonitor->VerifyFound(); } diff --git a/tests/unit/shader_interface.cpp b/tests/unit/shader_interface.cpp index 8f113a5e2b0..41dd257fa3c 100644 --- a/tests/unit/shader_interface.cpp +++ b/tests/unit/shader_interface.cpp @@ -1152,8 +1152,7 @@ TEST_F(NegativeShaderInterface, VertexOutputNotConsumed) { const auto set_info = [&](CreatePipelineHelper &helper) { helper.shader_stages_ = {vs.GetStageCreateInfo(), helper.fs_->GetStageCreateInfo()}; }; - CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, - "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"); + CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, "WARNING-Shader-OutputNotConsumed"); } // Spec doesn't clarify if this is valid or not @@ -1225,8 +1224,7 @@ TEST_F(NegativeShaderInterface, DISABLED_InputAndOutputComponents) { const auto set_info = [&](CreatePipelineHelper &helper) { helper.shader_stages_ = {vs.GetStageCreateInfo(), fs.GetStageCreateInfo()}; }; - CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, - "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"); + CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, "WARNING-Shader-OutputNotConsumed"); } { diff --git a/tests/unit/sync_object.cpp b/tests/unit/sync_object.cpp index f688c561b5b..4f914f5c644 100644 --- a/tests/unit/sync_object.cpp +++ b/tests/unit/sync_object.cpp @@ -1345,23 +1345,23 @@ TEST_F(NegativeSyncObject, BarrierQueueFamily) { // negative testing for QFO transfer tracking // Duplicate release in one CB - excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00001", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00001", submit_family, + excl_test("WARNING-VkImageMemoryBarrier-image-00001", "WARNING-VkBufferMemoryBarrier-buffer-00001", submit_family, other_family, submit_family, BarrierQueueFamilyTestHelper::DOUBLE_RECORD); // Duplicate pending release - excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00003", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00003", submit_family, + excl_test("WARNING-VkImageMemoryBarrier-image-00003", "WARNING-VkBufferMemoryBarrier-buffer-00003", submit_family, other_family, submit_family); // Duplicate acquire in one CB - excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00001", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00001", submit_family, + 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); // Duplicate release in two CB - excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00002", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00002", submit_family, + excl_test("WARNING-VkImageMemoryBarrier-image-00002", "WARNING-VkBufferMemoryBarrier-buffer-00002", submit_family, other_family, submit_family, BarrierQueueFamilyTestHelper::DOUBLE_COMMAND_BUFFER); // Duplicate acquire in two CB excl_test(submit_family, other_family, submit_family); // need a succesful release - excl_test("UNASSIGNED-VkImageMemoryBarrier-image-00002", "UNASSIGNED-VkBufferMemoryBarrier-buffer-00002", submit_family, + excl_test("WARNING-VkImageMemoryBarrier-image-00002", "WARNING-VkBufferMemoryBarrier-buffer-00002", submit_family, other_family, other_family, BarrierQueueFamilyTestHelper::DOUBLE_COMMAND_BUFFER); // Need a third queue family to test this. @@ -3508,7 +3508,7 @@ TEST_F(NegativeSyncObject, QueueForwardProgressFenceWait) { RETURN_IF_SKIP(Init()); InitRenderTarget(); - const char *queue_forward_progress_message = "UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress"; + const char *queue_forward_progress_message = "UNASSIGNED-vkQueueSubmit-QueueForwardProgress"; vkt::CommandBuffer cb1(m_device, m_commandPool); cb1.begin(); diff --git a/tests/unit/vertex_input.cpp b/tests/unit/vertex_input.cpp index b503c57a077..a0738c7245d 100644 --- a/tests/unit/vertex_input.cpp +++ b/tests/unit/vertex_input.cpp @@ -666,8 +666,7 @@ TEST_F(NegativeVertexInput, AttributeNotConsumed) { helper.vi_ci_.pVertexAttributeDescriptions = &input_attrib; helper.vi_ci_.vertexAttributeDescriptionCount = 1; }; - CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, - "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"); + CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, "WARNING-Shader-OutputNotConsumed"); } TEST_F(NegativeVertexInput, AttributeLocationMismatch) { @@ -691,8 +690,7 @@ TEST_F(NegativeVertexInput, AttributeLocationMismatch) { helper.vi_ci_.vertexAttributeDescriptionCount = 1; }; - CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, - "UNASSIGNED-CoreValidation-Shader-OutputNotConsumed"); + CreatePipelineHelper::OneshotTest(*this, set_info, kPerformanceWarningBit, "WARNING-Shader-OutputNotConsumed"); } TEST_F(NegativeVertexInput, AttributeNotProvided) { diff --git a/tests/unit/wsi.cpp b/tests/unit/wsi.cpp index c4d24d8a589..a949f13ca6d 100644 --- a/tests/unit/wsi.cpp +++ b/tests/unit/wsi.cpp @@ -1452,7 +1452,7 @@ TEST_F(NegativeWsi, WarningSwapchainCreateInfoPreTransform) { RETURN_IF_SKIP(InitState()); InitRenderTarget(); - m_errorMonitor->SetDesiredFailureMsg(kPerformanceWarningBit, "UNASSIGNED-CoreValidation-SwapchainPreTransform"); + m_errorMonitor->SetDesiredFailureMsg(kPerformanceWarningBit, "WARNING-Swapchain-PreTransform"); m_errorMonitor->SetUnexpectedError("VUID-VkSwapchainCreateInfoKHR-preTransform-01279"); InitSwapchain(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR); m_errorMonitor->VerifyFound();