diff options
Diffstat (limited to 'layers/draw_state.cpp')
| -rw-r--r-- | layers/draw_state.cpp | 2 |
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]; |
