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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40578>
This commit is contained in:
Tomeu Vizoso 2026-03-26 09:17:49 +01:00
parent f0e4ccf664
commit f06b4dbe33

View file

@ -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