diff options
| author | Tobin Ehlis <tobin@lunarg.com> | 2015-06-23 08:46:18 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobin@lunarg.com> | 2015-06-25 08:36:38 -0600 |
| commit | 436564308e52d09c3ca4f34a23e5bdc5bade483f (patch) | |
| tree | eb323cd9f62383064abf7d3116047cf759be59af | |
| parent | 9122c7111db2c3be06c75b43c8cae898f568b425 (diff) | |
| download | usermoji-436564308e52d09c3ca4f34a23e5bdc5bade483f.tar.xz | |
layers: Added DrawState check to flag error if compute pipeline bound during RenderPass
| -rw-r--r-- | layers/draw_state.cpp | 4 | ||||
| -rw-r--r-- | layers/draw_state.h | 1 |
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; |
