aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-01-29 07:52:45 -0700
committerTobin Ehlis <tobine@google.com>2016-02-03 15:55:10 -0700
commit3eec9ae1d564a99b124bf2eef1c4ec85f539626c (patch)
tree3ee1a1085c01e4d36f30e5841c237347ee4cfe2e
parent5bc5421fb655a38afff00939afcdc1f2482f14b2 (diff)
downloadusermoji-3eec9ae1d564a99b124bf2eef1c4ec85f539626c.tar.xz
layers: GL64 Don't warn on descriptor set that's not updated
Previously was not handling the case of 0 sets in a layout. Now catching this case by verifying that a descriptor set's layout bindingCount is not zero before incrementing internal descriptorCount variable.
-rw-r--r--layers/draw_state.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index a26890f4..84728b6f 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -4254,7 +4254,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice
pNewNode->pLayout = pLayout;
pNewNode->pool = pAllocateInfo->descriptorPool;
pNewNode->set = pDescriptorSets[i];
- pNewNode->descriptorCount = pLayout->endIndex + 1;
+ pNewNode->descriptorCount = (pLayout->createInfo.bindingCount != 0) ? pLayout->endIndex + 1 : 0;
if (pNewNode->descriptorCount) {
size_t descriptorArraySize = sizeof(GENERIC_HEADER*)*pNewNode->descriptorCount;
pNewNode->ppDescriptors = new GENERIC_HEADER*[descriptorArraySize];