From 900ce1f4f44136487a6fe7061fd21db0686e84bb Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 28 Oct 2023 18:18:15 +0200 Subject: [PATCH] rusticl/queue: release bound constant buffer This fixes memory leaks in drivers. Signed-off-by: Karol Herbst Part-of: --- src/gallium/frontends/rusticl/core/queue.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/frontends/rusticl/core/queue.rs b/src/gallium/frontends/rusticl/core/queue.rs index c089aa4af8a..1275f48786e 100644 --- a/src/gallium/frontends/rusticl/core/queue.rs +++ b/src/gallium/frontends/rusticl/core/queue.rs @@ -45,6 +45,12 @@ impl Deref for QueueContext { } } +impl Drop for QueueContext { + fn drop(&mut self) { + self.ctx.set_constant_buffer(0, &[]) + } +} + struct QueueState { pending: Vec>, last: Weak,