radeonsi/compute: Call si_pm4_free_state() after emitting compute state
authorTom Stellard <thomas.stellard@amd.com>
Fri, 8 Aug 2014 13:38:08 +0000 (09:38 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 13 Aug 2014 18:17:02 +0000 (14:17 -0400)
This will decrement the reference count for buffers referenced in the
command stream will prevent us from leaking them.

CC: "10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/radeonsi/si_compute.c

index 2ddd7c2bafd1cac3f732dd4a7d55588e20f96de0..4ce11bfaa7408a800c92ae06bb2f4654a0d9e21c 100644 (file)
@@ -372,8 +372,8 @@ static void si_launch_grid(
        }
 #endif
 
-       FREE(pm4);
        FREE(kernel_args);
+       si_pm4_free_state(sctx, pm4, ~0);
 }