aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-06-15 08:41:17 -0600
committerTobin Ehlis <tobin@lunarg.com>2015-06-15 08:41:17 -0600
commit2169b02ca0aa93c65a82be0e9e2ad6395b21ff28 (patch)
tree69831e223bda1b70d48564ff23585a546ed97582
parente059c074fedba82aa52bd8741712ac5da37be65f (diff)
downloadusermoji-2169b02ca0aa93c65a82be0e9e2ad6395b21ff28.tar.xz
layers: When printing descriptor info in DrawState correctly handle case of 0 descriptors
-rwxr-xr-xlayers/draw_state.cpp10
1 files changed, 8 insertions, 2 deletions
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);
+ }
}
}
}