diff options
| author | Mike Weiblen <mikew@lunarg.com> | 2016-12-06 17:10:22 -0700 |
|---|---|---|
| committer | Mike Weiblen <mikew@lunarg.com> | 2016-12-08 13:56:51 -0700 |
| commit | 944e56e595a9915028b217731c83971609eb9f3d (patch) | |
| tree | 4c1a5644113542c55845f2b203dcd08cd38eb461 /layers | |
| parent | 9f8f3b1cf390851eb40fa00ba45ff5227fda47b9 (diff) | |
| download | usermoji-944e56e595a9915028b217731c83971609eb9f3d.tar.xz | |
layers: Update Valid Usage enums in log_msg
Update Valid Usage enums in CmdExecuteCommands() and their
status in the VU database.
This partially implements Jira task VL-65
Change-Id: Ia31dbf78ed93418ced6597401d77f3fa6488935e
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/core_validation.cpp | 37 | ||||
| -rw-r--r-- | layers/vk_validation_error_database.txt | 8 |
2 files changed, 23 insertions, 22 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index f700dbfd..126ddcfb 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -10988,24 +10988,25 @@ CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, if (!pSubCB) { skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, - DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", - "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p in element %u of pCommandBuffers array.", - (void *)pCommandBuffers[i], i); + VALIDATION_ERROR_00160, "DS", + "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p in element %u of pCommandBuffers array. %s", + (void *)pCommandBuffers[i], i, validation_error_map[VALIDATION_ERROR_00160]); } else if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) { skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, - __LINE__, DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", + __LINE__, VALIDATION_ERROR_00153, "DS", "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%p in element %u of pCommandBuffers " - "array. All cmd buffers in pCommandBuffers array must be secondary.", - (void *)pCommandBuffers[i], i); + "array. All cmd buffers in pCommandBuffers array must be secondary. %s", + (void *)pCommandBuffers[i], i, validation_error_map[VALIDATION_ERROR_00153]); } else if (pCB->activeRenderPass) { // Secondary CB w/i RenderPass must have *CONTINUE_BIT set auto secondary_rp_state = getRenderPassState(dev_data, pSubCB->beginInfo.pInheritanceInfo->renderPass); if (!(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { skip_call |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - (uint64_t)pCommandBuffers[i], __LINE__, DRAWSTATE_BEGIN_CB_INVALID_STATE, "DS", + (uint64_t)pCommandBuffers[i], __LINE__, VALIDATION_ERROR_02057, "DS", "vkCmdExecuteCommands(): Secondary Command Buffer (0x%p) executed within render pass (0x%" PRIxLEAST64 - ") must have had vkBeginCommandBuffer() called w/ VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set.", - (void *)pCommandBuffers[i], (uint64_t)pCB->activeRenderPass->renderPass); + ") must have had vkBeginCommandBuffer() called w/ VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set. %s", + (void *)pCommandBuffers[i], (uint64_t)pCB->activeRenderPass->renderPass, + validation_error_map[VALIDATION_ERROR_02057]); } else { // Make sure render pass is compatible with parent command buffer pass if has continue if (pCB->activeRenderPass->renderPass != secondary_rp_state->renderPass) { @@ -11037,12 +11038,12 @@ CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, // being recorded if (!(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { if (dev_data->globalInFlightCmdBuffers.find(pSubCB->commandBuffer) != dev_data->globalInFlightCmdBuffers.end()) { - skip_call |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - (uint64_t)(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "DS", - "Attempt to simultaneously execute command buffer 0x%" PRIxLEAST64 - " without VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set!", - (uint64_t)(pCB->commandBuffer)); + skip_call |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)(pCB->commandBuffer), __LINE__, + VALIDATION_ERROR_00154, "DS", "Attempt to simultaneously execute command buffer 0x%" PRIxLEAST64 + " without VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set! %s", + (uint64_t)(pCB->commandBuffer), validation_error_map[VALIDATION_ERROR_00154]); } if (pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT) { // Warn that non-simultaneous secondary cmd buffer renders primary non-simultaneous @@ -11060,12 +11061,12 @@ CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, if (!pCB->activeQueries.empty() && !dev_data->enabled_features.inheritedQueries) { skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - reinterpret_cast<uint64_t>(pCommandBuffers[i]), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", + reinterpret_cast<uint64_t>(pCommandBuffers[i]), __LINE__, VALIDATION_ERROR_02062, "DS", "vkCmdExecuteCommands(): Secondary Command Buffer " "(0x%" PRIxLEAST64 ") cannot be submitted with a query in " "flight and inherited queries not " - "supported on this device.", - reinterpret_cast<uint64_t>(pCommandBuffers[i])); + "supported on this device. %s", + reinterpret_cast<uint64_t>(pCommandBuffers[i]), validation_error_map[VALIDATION_ERROR_02062]); } // Propagate layout transitions to the primary cmd buffer for (auto ilm_entry : pSubCB->imageLayoutMap) { diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt index 6a2dc2fd..e351d426 100644 --- a/layers/vk_validation_error_database.txt +++ b/layers/vk_validation_error_database.txt @@ -156,8 +156,8 @@ VALIDATION_ERROR_00149~^~Y~^~None~^~vkQueueSubmit~^~For more information refer t VALIDATION_ERROR_00150~^~Y~^~None~^~vkQueueSubmit~^~For more information refer to Vulkan Spec Section '5.4. Command Buffer Submission' which states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkSubmitInfo)~^~ VALIDATION_ERROR_00151~^~U~^~Unknown~^~vkQueueSubmit~^~For more information refer to Vulkan Spec Section '5.4. Command Buffer Submission' which states 'Each of the elements of pCommandBuffers, the elements of pSignalSemaphores, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkSubmitInfo)~^~ VALIDATION_ERROR_00152~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'commandBuffer must have been allocated with a level of VK_COMMAND_BUFFER_LEVEL_PRIMARY' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ -VALIDATION_ERROR_00153~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must have been allocated with a level of VK_COMMAND_BUFFER_LEVEL_SECONDARY' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ -VALIDATION_ERROR_00154~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must not be already pending execution in commandBuffer, or appear twice in pCommandBuffers, unless it was recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ +VALIDATION_ERROR_00153~^~Y~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must have been allocated with a level of VK_COMMAND_BUFFER_LEVEL_SECONDARY' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ +VALIDATION_ERROR_00154~^~Y~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must not be already pending execution in commandBuffer, or appear twice in pCommandBuffers, unless it was recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_00155~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must not be already pending execution in any other VkCommandBuffer, unless it was recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_00156~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must be in the executable state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_00157~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'Any given element of pCommandBuffers must have been allocated from a VkCommandPool that was created for the same queue family as the VkCommandPool from which commandBuffer was allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ @@ -1986,12 +1986,12 @@ VALIDATION_ERROR_02053~^~U~^~Unknown~^~vkDestroyDebugReportCallbackEXT~^~For mor VALIDATION_ERROR_02054~^~U~^~Unknown~^~vkDestroyDebugReportCallbackEXT~^~For more information refer to Vulkan Spec Section '33.2. Debug Report Callbacks' which states 'callback must have been created, allocated, or retrieved from instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkDestroyDebugReportCallbackEXT)~^~ VALIDATION_ERROR_02055~^~U~^~Unknown~^~vkDestroyDevice~^~For more information refer to Vulkan Spec Section '4.3.2. Queue Creation' which states 'queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkDeviceQueueCreateInfo)~^~ VALIDATION_ERROR_02056~^~U~^~Unknown~^~vkDestroyDevice~^~For more information refer to Vulkan Spec Section '4.3.2. Queue Creation' which states 'Each element of pQueuePriorities must be between 0.0 and 1.0 inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkDeviceQueueCreateInfo)~^~ -VALIDATION_ERROR_02057~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is being called within a render pass instance, any given element of pCommandBuffers must have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ +VALIDATION_ERROR_02057~^~Y~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is being called within a render pass instance, any given element of pCommandBuffers must have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02058~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is being called within a render pass instance, any given element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::subpass set to the index of the subpass which the given command buffer will be executed in' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02059~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is being called within a render pass instance, the render passes specified in the pname::pBeginInfo::pInheritanceInfo::renderPass members of the vkBeginCommandBuffer commands used to begin recording each element of pCommandBuffers must be compatible with the current render pass.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02060~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is being called within a render pass instance, and any given element of pCommandBuffers was recorded with VkCommandBufferInheritanceInfo::framebuffer not equal to VK_NULL_HANDLE, that VkFramebuffer must match the VkFramebuffer used in the current render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02061~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If vkCmdExecuteCommands is not being called within a render pass instance, any given element of pCommandBuffers must not have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ -VALIDATION_ERROR_02062~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If the inherited queries feature is not enabled, commandBuffer must not have any queries active' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ +VALIDATION_ERROR_02062~^~Y~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If the inherited queries feature is not enabled, commandBuffer must not have any queries active' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02063~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If commandBuffer has a VK_QUERY_TYPE_OCCLUSION query active, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::occlusionQueryEnable set to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02064~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If commandBuffer has a VK_QUERY_TYPE_OCCLUSION query active, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::queryFlags having all bits set that are set for the query' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ VALIDATION_ERROR_02065~^~U~^~Unknown~^~vkCmdExecuteCommands~^~For more information refer to Vulkan Spec Section '5.6. Secondary Command Buffer Execution' which states 'If commandBuffer has a VK_QUERY_TYPE_PIPELINE_STATISTICS query active, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::pipelineStatistics having all bits set that are set in the VkQueryPool the query uses' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#vkCmdExecuteCommands)~^~ |
