layers: Added DrawState check to flag error if compute pipeline bound during RenderPass
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 3b50649..ce12fba 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2122,6 +2122,10 @@
if (pCB->state == CB_UPDATE_ACTIVE) {
updateCBTracking(cmdBuffer);
addCmd(pCB, CMD_BINDPIPELINE);
+ if ((VK_PIPELINE_BIND_POINT_COMPUTE == pipelineBindPoint) && (pCB->activeRenderPass)) {
+ log_msg(mdd(cmdBuffer), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_PIPELINE, pipeline, 0, DRAWSTATE_INVALID_RENDERPASS_CMD, "DS",
+ "Incorrectly binding compute pipeline (%p) during active RenderPass (%p)", (void*)pipeline, (void*)pCB->activeRenderPass);
+ }
PIPELINE_NODE* pPN = getPipeline(pipeline);
if (pPN) {
pCB->lastBoundPipeline = pipeline;