From 592b8136eb63ef922d28897378bb03c6060f47a6 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Mon, 11 Apr 2016 14:11:46 -0600 Subject: layers: Update core_validation to fix lx265. Tobin discovered an issue with my previous change. This resolves the issue with the blend state targeting only a specific subpass and verifying the subpass attachment count matches the blend attachment count. Change-Id: Iacdd880dde32267da095a3e9baa9e8eb66fdc760 --- layers/core_validation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a51d7bdd..c1361214 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3225,6 +3225,16 @@ static bool validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE *pCB VkSampleCountFlagBits subpassNumSamples = (VkSampleCountFlagBits)0; uint32_t i; + const VkPipelineColorBlendStateCreateInfo *pColorBlendState = pPipeline->graphicsPipelineCI.pColorBlendState; + if ((pColorBlendState != NULL) && (pCB->activeSubpass == pPipeline->graphicsPipelineCI.subpass) && + (pColorBlendState->attachmentCount != pSD->colorAttachmentCount)) { + return log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + reinterpret_cast(pipeline), __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS", + "Render pass subpass %u mismatch with blending state defined and blend state attachment " + "count %u but subpass color attachment count %u! These must be the same.", + pCB->activeSubpass, pColorBlendState->attachmentCount, pSD->colorAttachmentCount); + } + for (i = 0; i < pSD->colorAttachmentCount; i++) { VkSampleCountFlagBits samples; -- cgit v1.2.3