From 9e299b50ab55f153ad80f4f06c9ee2f74dbb6216 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 6 Oct 2021 09:18:42 -0500 Subject: [PATCH] radv: Stop printing descriptor pool allocation failures The VK_ERROR_FRAGMENTED_POOL and VK_ERROR_OUT_OF_POOL_MEMORY errors are not as exceptional cases as most. These are expected to be hit by applications in the normal course of doing their thing. Probably best not to spam stderr and the debug logs with them. Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_descriptor_set.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index d6449742f64..4508fe64230 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -563,7 +563,7 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po if (pool->host_memory_base) { if (pool->host_memory_end - pool->host_memory_ptr < mem_size) - return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_MEMORY); + return VK_ERROR_OUT_OF_POOL_MEMORY; set = (struct radv_descriptor_set *)pool->host_memory_ptr; pool->host_memory_ptr += mem_size; @@ -600,7 +600,7 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po if (!pool->host_memory_base && pool->entry_count == pool->max_entry_count) { vk_free2(&device->vk.alloc, NULL, set); - return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_MEMORY); + return VK_ERROR_OUT_OF_POOL_MEMORY; } /* try to allocate linearly first, so that we don't spend @@ -629,7 +629,7 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po if (pool->size - offset < layout_size) { vk_free2(&device->vk.alloc, NULL, set); - return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_MEMORY); + return VK_ERROR_OUT_OF_POOL_MEMORY; } set->header.bo = pool->bo; set->header.mapped_ptr = (uint32_t *)(pool->mapped_ptr + offset); @@ -641,7 +641,7 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po pool->entries[index].set = set; pool->entry_count++; } else - return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_MEMORY); + return VK_ERROR_OUT_OF_POOL_MEMORY; if (layout->has_immutable_samplers) { for (unsigned i = 0; i < layout->binding_count; ++i) {