aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-04-11 14:11:46 -0600
committerTobin Ehlis <tobine@google.com>2016-04-14 16:21:21 -0600
commit592b8136eb63ef922d28897378bb03c6060f47a6 (patch)
tree50828f9935db76f943835d8243f073ada333c61b /layers/core_validation.cpp
parent06786cdf240f54f63f0477a622f9ba0f34a8c20a (diff)
downloadusermoji-592b8136eb63ef922d28897378bb03c6060f47a6.tar.xz
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
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp10
1 files changed, 10 insertions, 0 deletions
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<const uint64_t &>(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;