From 826819e74fce3dc553a141bf9fc05e88713d16c1 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 6 Sep 2017 13:27:52 -0600 Subject: layers:Migrate render pass compatibility check Update render pass compatibility check at BeginCommandBuffer time to use the refactored common function. Phasing out the other compatibility function. --- layers/core_validation.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 71d8ee02..c2ebffd1 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5093,21 +5093,12 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, string errorString = ""; auto framebuffer = GetFramebufferState(dev_data, pInfo->framebuffer); if (framebuffer) { - if ((framebuffer->createInfo.renderPass != pInfo->renderPass) && - !verify_renderpass_compatibility(dev_data, framebuffer->rp_state->createInfo.ptr(), - GetRenderPassState(dev_data, pInfo->renderPass)->createInfo.ptr(), - errorString)) { + if (framebuffer->createInfo.renderPass != pInfo->renderPass) { // renderPass that framebuffer was created with must be compatible with local renderPass - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, - VALIDATION_ERROR_0280006e, "DS", - "vkBeginCommandBuffer(): Secondary Command " - "Buffer (0x%p) renderPass (0x%" PRIxLEAST64 - ") is incompatible w/ framebuffer " - "(0x%" PRIxLEAST64 ") w/ render pass (0x%" PRIxLEAST64 ") due to: %s. %s", - commandBuffer, HandleToUint64(pInfo->renderPass), HandleToUint64(pInfo->framebuffer), - HandleToUint64(framebuffer->createInfo.renderPass), errorString.c_str(), - validation_error_map[VALIDATION_ERROR_0280006e]); + skip |= + validateRenderPassCompatibility(dev_data, "framebuffer", framebuffer->rp_state, "command buffer", + GetRenderPassState(dev_data, pInfo->renderPass), + "vkBeginCommandBuffer()", VALIDATION_ERROR_0280006e); } // Connect this framebuffer and its children to this cmdBuffer AddFramebufferBinding(dev_data, cb_node, framebuffer); -- cgit v1.2.3