aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
authorCody Northrop <cody@lunarg.com>2015-08-03 12:47:29 -0600
committerCody Northrop <cody@lunarg.com>2015-08-04 17:37:03 -0600
commit15954693fd35d905b650bef4ec01c2dd216bde90 (patch)
tree999e5a0c6820c56e7a33b9db50d36279f909e0c9 /layers/draw_state.cpp
parent33467cf073a664161edb1d27a87b3611d3b289ec (diff)
downloadusermoji-15954693fd35d905b650bef4ec01c2dd216bde90.tar.xz
v139: Bug 14257 - Remove pCount parameter from vkAllocDescriptorSets
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index a9affafd..e17a36e4 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -1864,16 +1864,20 @@ VK_LAYER_EXPORT VkResult VKAPI vkResetDescriptorPool(VkDevice device, VkDescript
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount)
+VK_LAYER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets)
{
- VkResult result = get_dispatch_table(draw_state_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
- if ((VK_SUCCESS == result) || (*pCount > 0)) {
+ VkResult result = get_dispatch_table(draw_state_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
+ if (VK_SUCCESS == result) {
POOL_NODE *pPoolNode = getPoolNode(descriptorPool);
if (!pPoolNode) {
log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_DESCRIPTOR_POOL, descriptorPool.handle, 0, DRAWSTATE_INVALID_POOL, "DS",
"Unable to find pool node for pool %#" PRIxLEAST64 " specified in vkAllocDescriptorSets() call", descriptorPool.handle);
} else {
- for (uint32_t i = 0; i < *pCount; i++) {
+ if (count == 0) {
+ log_msg(mdd(device), VK_DBG_REPORT_INFO_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET, count, 0, DRAWSTATE_NONE, "DS",
+ "AllocDescriptorSets called with 0 count");
+ }
+ for (uint32_t i = 0; i < count; i++) {
log_msg(mdd(device), VK_DBG_REPORT_INFO_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET, pDescriptorSets[i].handle, 0, DRAWSTATE_NONE, "DS",
"Created Descriptor Set %#" PRIxLEAST64, pDescriptorSets[i].handle);
// Create new set node and add to head of pool nodes