mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
v3dv: add a helper to destoy pipeline layouts
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
This commit is contained in:
parent
adad285fc9
commit
425f8aa7a4
2 changed files with 19 additions and 4 deletions
|
|
@ -381,6 +381,19 @@ v3dv_CreatePipelineLayout(VkDevice _device,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
v3dv_pipeline_layout_destroy(struct v3dv_device *device,
|
||||
struct v3dv_pipeline_layout *layout,
|
||||
const VkAllocationCallbacks *alloc)
|
||||
{
|
||||
assert(layout);
|
||||
|
||||
for (uint32_t i = 0; i < layout->num_sets; i++)
|
||||
v3dv_descriptor_set_layout_unref(device, layout->set[i].layout);
|
||||
|
||||
vk_object_free(&device->vk, alloc, layout);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
v3dv_DestroyPipelineLayout(VkDevice _device,
|
||||
VkPipelineLayout _pipelineLayout,
|
||||
|
|
@ -392,10 +405,7 @@ v3dv_DestroyPipelineLayout(VkDevice _device,
|
|||
if (!pipeline_layout)
|
||||
return;
|
||||
|
||||
for (uint32_t i = 0; i < pipeline_layout->num_sets; i++)
|
||||
v3dv_descriptor_set_layout_unref(device, pipeline_layout->set[i].layout);
|
||||
|
||||
vk_object_free(&device->vk, pAllocator, pipeline_layout);
|
||||
v3dv_pipeline_layout_destroy(device, pipeline_layout, pAllocator);
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
|
|
|
|||
|
|
@ -1845,6 +1845,11 @@ struct v3dv_pipeline_layout {
|
|||
unsigned char sha1[20];
|
||||
};
|
||||
|
||||
void
|
||||
v3dv_pipeline_layout_destroy(struct v3dv_device *device,
|
||||
struct v3dv_pipeline_layout *layout,
|
||||
const VkAllocationCallbacks *alloc);
|
||||
|
||||
/*
|
||||
* We are using descriptor maps for ubo/ssbo and texture/samplers, so we need
|
||||
* it to be big enough to include the max value for all of them.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue