[Mesa-dev] [PATCH 4/7] radeonsi/compute: Call si_pm4_free_state() after emitting compute state

Tom Stellard thomas.stellard at amd.com
Fri Aug 8 07:16:41 PDT 2014


This will decrement the reference count for buffers referenced in the
command stream will prevent us from leaking them.

CC: "10.2" <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_compute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 482d475..e8fc8eb 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -374,8 +374,8 @@ static void si_launch_grid(
 	}
 #endif
 
-	FREE(pm4);
 	FREE(kernel_args);
+	si_pm4_free_state(sctx, pm4, ~0);
 }
 
 
-- 
1.8.1.5



More information about the mesa-dev mailing list