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

Submitted by Andres Rodriguez on Jan. 27, 2017, 5:03 a.m.

Details

Message ID 20170127050308.16584-4-andresx7@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Andres Rodriguez Jan. 27, 2017, 5:03 a.m.
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(-)

Patch hide | download patch | download mbox

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)