[Mesa-dev] [PATCH 5/6] anv: Return better errors from AllocateDescriptorSets

Jason Ekstrand jason at jlekstrand.net
Mon Jan 23 22:12:45 UTC 2017


---
 src/intel/vulkan/anv_descriptor_set.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index a5e65af..2d9734d 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -432,8 +432,12 @@ 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_MEMOR_KHR);
+   }
 
    set->size = size;
    set->layout = layout;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list