From: Jason Ekstrand Date: Sat, 21 Jan 2017 15:40:22 +0000 (-0800) Subject: anv: Return better errors from AllocateDescriptorSets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=756533520e1cd246065d18ebdcd87dccf7910681;p=mesa.git anv: Return better errors from AllocateDescriptorSets Reviewed-by: Iago Toral Quiroga Reviewed-by: Lionel Landwerlin --- 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;