From c307df2953e6b023531a6ef7fd11e3ee2f2c58b0 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 28 Sep 2016 15:19:39 +1300 Subject: layers: Complain about subpass mismatch between CB and pipeline Fixes #933. Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a513989f..b8eaa2c6 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3180,6 +3180,14 @@ static bool validatePipelineDrawtimeState(layer_data const *my_data, reinterpret_cast(pCB->activeRenderPass->renderPass), reinterpret_cast(pPipeline), reinterpret_cast(pPipeline->graphicsPipelineCI.renderPass), err_string.c_str()); } + + if (pPipeline->graphicsPipelineCI.subpass != pCB->activeSubpass) { + skip_call |= + log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + reinterpret_cast(pPipeline->pipeline), __LINE__, DRAWSTATE_RENDERPASS_INCOMPATIBLE, "DS", + "Pipeline was built for subpass %u but used in subpass %u", pPipeline->graphicsPipelineCI.subpass, + pCB->activeSubpass); + } } // TODO : Add more checks here -- cgit v1.2.3