From 3eec9ae1d564a99b124bf2eef1c4ec85f539626c Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Fri, 29 Jan 2016 07:52:45 -0700 Subject: 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. --- layers/draw_state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layers') 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]; -- cgit v1.2.3