mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 16:50:30 +01:00
pvr: Add missing NULL checks in some vkDestroy...() functions
Seems like `dEQP-VK.api.null_handle.destroy_device` was already passing but let's add the null check in case of future changes which might not accept NULL. Fixes: dEQP-VK.api.null_handle.destroy_descriptor_set_layout dEQP-VK.api.null_handle.destroy_pipeline_layout dEQP-VK.api.null_handle.destroy_query_pool 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/22918>
This commit is contained in:
parent
7cb77cb089
commit
bac048e1df
3 changed files with 12 additions and 0 deletions
|
|
@ -675,6 +675,9 @@ void pvr_DestroyDescriptorSetLayout(VkDevice _device,
|
|||
PVR_FROM_HANDLE(pvr_descriptor_set_layout, layout, _set_layout);
|
||||
PVR_FROM_HANDLE(pvr_device, device, _device);
|
||||
|
||||
if (!layout)
|
||||
return;
|
||||
|
||||
pvr_descriptor_set_layout_free(device, pAllocator, layout);
|
||||
}
|
||||
|
||||
|
|
@ -1031,6 +1034,9 @@ void pvr_DestroyPipelineLayout(VkDevice _device,
|
|||
PVR_FROM_HANDLE(pvr_device, device, _device);
|
||||
PVR_FROM_HANDLE(pvr_pipeline_layout, layout, _pipelineLayout);
|
||||
|
||||
if (!layout)
|
||||
return;
|
||||
|
||||
vk_object_free(&device->vk, pAllocator, layout);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1960,6 +1960,9 @@ void pvr_DestroyDevice(VkDevice _device,
|
|||
{
|
||||
PVR_FROM_HANDLE(pvr_device, device, _device);
|
||||
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
pvr_robustness_buffer_finish(device);
|
||||
pvr_spm_finish_scratch_buffer_store(device);
|
||||
pvr_queues_destroy(device);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ void pvr_DestroyQueryPool(VkDevice _device,
|
|||
PVR_FROM_HANDLE(pvr_query_pool, pool, queryPool);
|
||||
PVR_FROM_HANDLE(pvr_device, device, _device);
|
||||
|
||||
if (!pool)
|
||||
return;
|
||||
|
||||
pvr_bo_free(device, pool->availability_buffer);
|
||||
pvr_bo_free(device, pool->result_buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue