diff options
| author | Tobin Ehlis <tobin@lunarg.com> | 2015-06-15 08:41:17 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobin@lunarg.com> | 2015-06-15 08:41:17 -0600 |
| commit | 2169b02ca0aa93c65a82be0e9e2ad6395b21ff28 (patch) | |
| tree | 69831e223bda1b70d48564ff23585a546ed97582 | |
| parent | e059c074fedba82aa52bd8741712ac5da37be65f (diff) | |
| download | usermoji-2169b02ca0aa93c65a82be0e9e2ad6395b21ff28.tar.xz | |
layers: When printing descriptor info in DrawState correctly handle case of 0 descriptors
| -rwxr-xr-x | layers/draw_state.cpp | 10 |
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); + } } } } |
