mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
anv: consolidate DestroyPipeline for graphics and graphics_lib
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29011>
This commit is contained in:
parent
6223388c73
commit
a24ed1146d
1 changed files with 6 additions and 16 deletions
|
|
@ -327,24 +327,14 @@ void anv_DestroyPipeline(
|
|||
ANV_RMV(resource_destroy, device, pipeline);
|
||||
|
||||
switch (pipeline->type) {
|
||||
case ANV_PIPELINE_GRAPHICS:
|
||||
case ANV_PIPELINE_GRAPHICS_LIB: {
|
||||
struct anv_graphics_lib_pipeline *gfx_pipeline =
|
||||
anv_pipeline_to_graphics_lib(pipeline);
|
||||
struct anv_graphics_base_pipeline *gfx_pipeline =
|
||||
anv_pipeline_to_graphics_base(pipeline);
|
||||
|
||||
for (unsigned s = 0; s < ARRAY_SIZE(gfx_pipeline->base.shaders); s++) {
|
||||
if (gfx_pipeline->base.shaders[s])
|
||||
anv_shader_bin_unref(device, gfx_pipeline->base.shaders[s]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ANV_PIPELINE_GRAPHICS: {
|
||||
struct anv_graphics_pipeline *gfx_pipeline =
|
||||
anv_pipeline_to_graphics(pipeline);
|
||||
|
||||
for (unsigned s = 0; s < ARRAY_SIZE(gfx_pipeline->base.shaders); s++) {
|
||||
if (gfx_pipeline->base.shaders[s])
|
||||
anv_shader_bin_unref(device, gfx_pipeline->base.shaders[s]);
|
||||
for (unsigned s = 0; s < ARRAY_SIZE(gfx_pipeline->shaders); s++) {
|
||||
if (gfx_pipeline->shaders[s])
|
||||
anv_shader_bin_unref(device, gfx_pipeline->shaders[s]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue