From bda40694f006c2aa082a1040ff7e7a163080f40d Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 3 Jan 2017 14:07:17 -0700 Subject: [PATCH] layers:Remove redundant check Object tracker layer already makes sure that cmd buffers passed into vkCmdExecuteCommands() are valid so removing the duplicate check from core_validation. --- layers/core_validation.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index c3edf92..7277e25 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -11240,13 +11240,8 @@ CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, GLOBAL_CB_NODE *pSubCB = NULL; for (uint32_t i = 0; i < commandBuffersCount; i++) { pSubCB = getCBNode(dev_data, pCommandBuffers[i]); - if (!pSubCB) { - skip_call |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, - VALIDATION_ERROR_00160, "DS", - "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p in element %u of pCommandBuffers array. %s", - pCommandBuffers[i], i, validation_error_map[VALIDATION_ERROR_00160]); - } else if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) { + assert(pSubCB); + 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__, VALIDATION_ERROR_00153, "DS", "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%p in element %u of pCommandBuffers " -- 2.7.4