summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-06 09:32:01 -0700
committerJason Ekstrand <[email protected]>2015-10-06 09:32:01 -0700
commita145acd8121bb563fa01e059b890974dae757c5b (patch)
treef688d08c97bdadac6abef01e5d27df85d09e832b /src/vulkan/anv_device.c
parent8ba684cbad6963be54f27aeeb42708069f8d9bd3 (diff)
vk/0.170.2: Remove the pCount parameter from AllocDescriptorSets
Diffstat (limited to 'src/vulkan/anv_device.c')
-rw-r--r--src/vulkan/anv_device.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c
index f92b5fbf21b..3ab91726024 100644
--- a/src/vulkan/anv_device.c
+++ b/src/vulkan/anv_device.c
@@ -1652,29 +1652,28 @@ VkResult anv_AllocDescriptorSets(
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount)
+ VkDescriptorSet* pDescriptorSets)
{
ANV_FROM_HANDLE(anv_device, device, _device);
- VkResult result;
+ VkResult result = VK_SUCCESS;
struct anv_descriptor_set *set;
+ uint32_t i;
- for (uint32_t i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
ANV_FROM_HANDLE(anv_descriptor_set_layout, layout, pSetLayouts[i]);
result = anv_descriptor_set_create(device, layout, &set);
- if (result != VK_SUCCESS) {
- *pCount = i;
- return result;
- }
+ if (result != VK_SUCCESS)
+ break;
pDescriptorSets[i] = anv_descriptor_set_to_handle(set);
}
- *pCount = count;
+ if (result != VK_SUCCESS)
+ anv_FreeDescriptorSets(_device, descriptorPool, i, pDescriptorSets);
- return VK_SUCCESS;
+ return result;
}
VkResult anv_FreeDescriptorSets(