zink: use zink_destroy_shader_module() for compute to deduplicate code
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 3 Apr 2023 19:39:59 +0000 (15:39 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 01:33:17 +0000 (01:33 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22725>

src/gallium/drivers/zink/zink_program.c

index b7b54cd..2b5b2a0 100644 (file)
@@ -1528,8 +1528,7 @@ zink_destroy_compute_program(struct zink_screen *screen,
       free(pc_entry);
    }
    VKSCR(DestroyPipeline)(screen->dev, comp->base_pipeline, NULL);
-   VKSCR(DestroyShaderModule)(screen->dev, comp->module->obj.mod, NULL);
-   free(comp->module);
+   zink_destroy_shader_module(screen, comp->module);
 
    ralloc_free(comp);
 }