From f06b4dbe3320afed9909b526da2940850bdae27d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 26 Mar 2026 09:17:49 +0100 Subject: [PATCH] gallium: add ml_device_destroy callback to pipe_ml_device Add a destroy callback so that standalone ML devices created via *_ml_device_create() can properly free their resources. Part-of: --- src/gallium/include/pipe/p_state.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 0f0aa548340..d47712db67c 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -1331,6 +1331,13 @@ struct pipe_ml_device { */ void (*ml_subgraph_destroy)(struct pipe_ml_device *device, struct pipe_ml_subgraph *subgraph); + + /** + * Destroy the device and free all associated resources. + * + * \param device pipe_ml_device to destroy + */ + void (*ml_device_destroy)(struct pipe_ml_device *device); }; struct pipe_compute_state