radv: rework shaders ref counting
Introduce helpers like for descriptor set layouts. This will also help graphics pipeline libraries. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17628>
This commit is contained in:

committed by
Marge Bot

parent
6f4b6b4d11
commit
a2b8a92c72
@@ -217,10 +217,10 @@ radv_pipeline_destroy(struct radv_device *device, struct radv_pipeline *pipeline
|
||||
|
||||
for (unsigned i = 0; i < MESA_VULKAN_SHADER_STAGES; ++i)
|
||||
if (pipeline->shaders[i])
|
||||
radv_shader_destroy(device, pipeline->shaders[i]);
|
||||
radv_shader_unref(device, pipeline->shaders[i]);
|
||||
|
||||
if (pipeline->gs_copy_shader)
|
||||
radv_shader_destroy(device, pipeline->gs_copy_shader);
|
||||
radv_shader_unref(device, pipeline->gs_copy_shader);
|
||||
|
||||
if (pipeline->cs.buf)
|
||||
free(pipeline->cs.buf);
|
||||
|
Reference in New Issue
Block a user