From 756533520e1cd246065d18ebdcd87dccf7910681 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 21 Jan 2017 07:40:22 -0800 Subject: anv: Return better errors from AllocateDescriptorSets Reviewed-by: Iago Toral Quiroga Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_descriptor_set.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index a5e65afc489..a4b7638a618 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -432,8 +432,13 @@ anv_descriptor_set_create(struct anv_device *device, } } - if (set == NULL) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + if (set == NULL) { + if (pool->free_list != EMPTY) { + return vk_error(VK_ERROR_FRAGMENTED_POOL); + } else { + return vk_error(VK_ERROR_OUT_OF_POOL_MEMORY_KHR); + } + } set->size = size; set->layout = layout; -- cgit v1.2.3