[Mesa-dev] [PATCH 3/7] radv: use new error codes for AllocateDescriptorSets

Andres Rodriguez andresx7 at gmail.com
Fri Jan 27 05:03:04 UTC 2017


There is a new error code in Maintenance1 that is more specific to the
situation: VK_ERROR_OUT_OF_POOL_MEMORY_KHR

Fixes CTS test case:
dEQP-VK.api.descriptor_pool.out_of_pool_memory
---
 src/amd/vulkan/radv_descriptor_set.c | 2 +-
 src/amd/vulkan/radv_util.c           | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c
index eb8b5d6..6d89d60 100644
--- a/src/amd/vulkan/radv_descriptor_set.c
+++ b/src/amd/vulkan/radv_descriptor_set.c
@@ -298,7 +298,7 @@ radv_descriptor_set_create(struct radv_device *device,
 
 				if (entry < 0) {
 					vk_free2(&device->alloc, NULL, set);
-					return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY);
+					return vk_error(VK_ERROR_OUT_OF_POOL_MEMORY_KHR);
 				}
 				offset = pool->free_nodes[entry].offset;
 				pool->free_nodes[entry].next = pool->full_list;
diff --git a/src/amd/vulkan/radv_util.c b/src/amd/vulkan/radv_util.c
index c642bb7..9da442d 100644
--- a/src/amd/vulkan/radv_util.c
+++ b/src/amd/vulkan/radv_util.c
@@ -79,6 +79,7 @@ __vk_errorf(VkResult error, const char *file, int line, const char *format, ...)
 		/* Core errors */
 		ERROR_CASE(VK_ERROR_OUT_OF_HOST_MEMORY)
 			ERROR_CASE(VK_ERROR_OUT_OF_DEVICE_MEMORY)
+			ERROR_CASE(VK_ERROR_OUT_OF_POOL_MEMORY_KHR)
 			ERROR_CASE(VK_ERROR_INITIALIZATION_FAILED)
 			ERROR_CASE(VK_ERROR_DEVICE_LOST)
 			ERROR_CASE(VK_ERROR_MEMORY_MAP_FAILED)
-- 
2.9.3



More information about the mesa-dev mailing list