aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layers/draw_state.cpp4
-rw-r--r--layers/draw_state.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 3b50649b..ce12fba5 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2122,6 +2122,10 @@ VK_LAYER_EXPORT void VKAPI vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBi
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;
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 9c647782..90343950 100644
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -55,6 +55,7 @@ typedef enum _DRAW_STATE_ERROR
DRAWSTATE_DEPTH_STENCIL_NOT_BOUND, // Draw submitted with no depth-stencil state object bound when depth write enabled
DRAWSTATE_INDEX_BUFFER_NOT_BOUND, // Draw submitted with no depth-stencil state object bound when depth write enabled
DRAWSTATE_PIPELINE_LAYOUT_MISMATCH, // Draw submitted PSO Pipeline layout that doesn't match layout from BindDescriptorSets
+ DRAWSTATE_INVALID_RENDERPASS_CMD, // Invalid cmd submitted while a RenderPass is active
DRAWSTATE_INVALID_EXTENSION,
} DRAW_STATE_ERROR;