radv: Switch to the new common vk_error helpers
Also, change every vk_error to use the closest object instead of fetching all the way back to the instance. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13045>
This commit is contained in:

committed by
Marge Bot

parent
9e299b50ab
commit
7a2516568d
@@ -5607,7 +5607,7 @@ radv_graphics_pipeline_create(VkDevice _device, VkPipelineCache _cache,
|
||||
pipeline = vk_zalloc2(&device->vk.alloc, pAllocator, sizeof(*pipeline), 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (pipeline == NULL)
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
||||
vk_object_base_init(&device->vk, &pipeline->base, VK_OBJECT_TYPE_PIPELINE);
|
||||
pipeline->type = RADV_PIPELINE_GRAPHICS;
|
||||
@@ -5757,7 +5757,7 @@ radv_compute_pipeline_create(VkDevice _device, VkPipelineCache _cache,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (pipeline == NULL) {
|
||||
free(rt_stack_sizes);
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
vk_object_base_init(&device->vk, &pipeline->base, VK_OBJECT_TYPE_PIPELINE);
|
||||
|
Reference in New Issue
Block a user