diff options
author | Jason Ekstrand <[email protected]> | 2017-01-21 07:40:22 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-01-24 12:27:48 -0800 |
commit | 756533520e1cd246065d18ebdcd87dccf7910681 (patch) | |
tree | 6ab24f389a39cce5b6845bf0111a3f65892ecbaf | |
parent | 99bb4c22a5b0978b4beed80f974746852b113e50 (diff) |
anv: Return better errors from AllocateDescriptorSets
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |