aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2015-08-11 15:44:15 -0600
committerMark Lobodzinski <mark@lunarg.com>2015-08-11 15:50:16 -0600
commit86ae5595de834f525023578f62cc341c6dc720c6 (patch)
tree50f88e0a51359916e0aa3e10ba1e7b814224b2a7 /layers/draw_state.cpp
parent7d72126a322198eea5a8a8f4f7b1a790d59a7074 (diff)
downloadusermoji-86ae5595de834f525023578f62cc341c6dc720c6.tar.xz
layers: Don't output DrawState dynamic state info for null handles
This was causing random segfaults in the layer validation tests.
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index a425efc0..fdd82cfa 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -375,13 +375,17 @@ static void printDynamicState(const VkCmdBuffer cb)
if (pCB) {
loader_platform_thread_lock_mutex(&globalLock);
for (uint32_t i = 0; i < VK_NUM_STATE_BIND_POINT; i++) {
- void* pDynStateCI = getDynamicStateCreateInfo(pCB->lastBoundDynamicState[i], (DYNAMIC_STATE_BIND_POINT)i);
- if (pDynStateCI) {
- log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, dynamicStateBindPointToObjType((DYNAMIC_STATE_BIND_POINT)i), pCB->lastBoundDynamicState[i], 0, DRAWSTATE_NONE, "DS",
- "Reporting CreateInfo for currently bound %s object %#" PRIxLEAST64, string_DYNAMIC_STATE_BIND_POINT((DYNAMIC_STATE_BIND_POINT)i).c_str(), pCB->lastBoundDynamicState[i]);
- log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, dynamicStateBindPointToObjType((DYNAMIC_STATE_BIND_POINT)i), pCB->lastBoundDynamicState[i], 0, DRAWSTATE_NONE, "DS",
- dynamic_display(pDynStateCI, " ").c_str());
- break;
+ if (pCB->lastBoundDynamicState[i]) {
+ void* pDynStateCI = getDynamicStateCreateInfo(pCB->lastBoundDynamicState[i], (DYNAMIC_STATE_BIND_POINT)i);
+ if (pDynStateCI) {
+ log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, dynamicStateBindPointToObjType((DYNAMIC_STATE_BIND_POINT)i), pCB->lastBoundDynamicState[i], 0, DRAWSTATE_NONE, "DS",
+ "Reporting CreateInfo for currently bound %s object %#" PRIxLEAST64, string_DYNAMIC_STATE_BIND_POINT((DYNAMIC_STATE_BIND_POINT)i).c_str(), pCB->lastBoundDynamicState[i]);
+ log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, dynamicStateBindPointToObjType((DYNAMIC_STATE_BIND_POINT)i), pCB->lastBoundDynamicState[i], 0, DRAWSTATE_NONE, "DS",
+ dynamic_display(pDynStateCI, " ").c_str());
+ } else {
+ log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NONE, "DS",
+ "No dynamic state of type %s bound", string_DYNAMIC_STATE_BIND_POINT((DYNAMIC_STATE_BIND_POINT)i).c_str());
+ }
} else {
log_msg(mdd(cb), VK_DBG_REPORT_INFO_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NONE, "DS",
"No dynamic state of type %s bound", string_DYNAMIC_STATE_BIND_POINT((DYNAMIC_STATE_BIND_POINT)i).c_str());