summaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-09-28 15:19:39 +1300
committerChris Forbes <chrisforbes@google.com>2016-09-30 09:38:13 +1300
commitc307df2953e6b023531a6ef7fd11e3ee2f2c58b0 (patch)
tree1e0e66736a367b8eaedfa0a649f9df3c7c1a6e40 /layers/core_validation.cpp
parenta1a137ec383fef3881f86d4c202b1de56a91edf0 (diff)
layers: Complain about subpass mismatch between CB and pipeline
Fixes #933. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp8
1 files changed, 8 insertions, 0 deletions
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<uint64_t &>(pCB->activeRenderPass->renderPass), reinterpret_cast<uint64_t &>(pPipeline),
reinterpret_cast<const uint64_t &>(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<uint64_t const &>(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