summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c9
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;