From 2169b02ca0aa93c65a82be0e9e2ad6395b21ff28 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 15 Jun 2015 08:41:17 -0600 Subject: layers: When printing descriptor info in DrawState correctly handle case of 0 descriptors --- layers/draw_state.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'layers/draw_state.cpp') diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 64b2c3aa..c47ad889 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -1385,8 +1385,14 @@ static void printDSConfig(const VkCmdBuffer cb) // TODO : If there is a "view" associated with this update, print CI for that view } else { - sprintf(tmp_str, "No Update Chain for descriptor set %p (vkUpdateDescriptors has not been called)", (void*)pSet->set); - layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, NULL, 0, DRAWSTATE_NONE, "DS", tmp_str); + if (0 != pSet->descriptorCount) { + sprintf(tmp_str, "No Update Chain for descriptor set %p which has %u descriptors (vkUpdateDescriptors has not been called)", (void*)pSet->set, pSet->descriptorCount); + layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, NULL, 0, DRAWSTATE_NONE, "DS", tmp_str); + } + else { + sprintf(tmp_str, "FYI: No descriptors in descriptor set %p.", (void*)pSet->set); + layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, NULL, 0, DRAWSTATE_NONE, "DS", tmp_str); + } } } } -- cgit v1.2.3