mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
pvr: Fix vk_free() in vkCreateRenderPass2() error path
There was a missing vk_free() and one at the wrong place. Fixes: dEQP-VK.api.object_management.alloc_callback_fail.render_pass Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23070>
This commit is contained in:
parent
792cf1caff
commit
2dcbeb234e
2 changed files with 7 additions and 7 deletions
|
|
@ -2495,9 +2495,8 @@ VkResult pvr_create_renderpass_hwsetup(
|
|||
__typeof__(*subpass_map),
|
||||
pass->subpass_count);
|
||||
|
||||
if (!vk_multialloc_zalloc(&ma, alloc, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT)) {
|
||||
if (!vk_multialloc_zalloc(&ma, alloc, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT))
|
||||
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
hw_setup->surface_allocate = surface_allocate;
|
||||
hw_setup->subpass_map = subpass_map;
|
||||
|
|
@ -2516,6 +2515,7 @@ VkResult pvr_create_renderpass_hwsetup(
|
|||
if (!vk_multialloc_zalloc(&ma_ctx,
|
||||
alloc,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) {
|
||||
vk_free(alloc, hw_setup);
|
||||
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -674,16 +674,16 @@ VkResult pvr_CreateRenderPass2(VkDevice _device,
|
|||
pass,
|
||||
hw_render,
|
||||
&load_op);
|
||||
if (result != VK_SUCCESS)
|
||||
goto err_load_op_destroy;
|
||||
|
||||
result =
|
||||
pvr_generate_load_op_shader(device, pAllocator, hw_render, load_op);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free2(&device->vk.alloc, pAllocator, load_op);
|
||||
goto err_load_op_destroy;
|
||||
}
|
||||
|
||||
result =
|
||||
pvr_generate_load_op_shader(device, pAllocator, hw_render, load_op);
|
||||
if (result != VK_SUCCESS)
|
||||
goto err_load_op_destroy;
|
||||
|
||||
hw_render->load_op = load_op;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue