summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pm4.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-03-07 21:52:51 +0100
committerChristian König <[email protected]>2014-03-08 16:08:15 +0100
commit58d2afa2232060b88f9c444ce7a0d6e63c841bb2 (patch)
tree287f79427e18851d22992fe81973fa66c5b40469 /src/gallium/drivers/radeonsi/si_pm4.c
parent1fa2acba6195230fc738d2854678bc28864ca5c0 (diff)
radeonsi: fix leaking the bound state on destruction v2
v2: rebased on stale pointer fixes Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pm4.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pm4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c
index 51bf67eccb7..0a5673ba917 100644
--- a/src/gallium/drivers/radeonsi/si_pm4.c
+++ b/src/gallium/drivers/radeonsi/si_pm4.c
@@ -251,3 +251,10 @@ void si_pm4_reset_emitted(struct si_context *sctx)
{
memset(&sctx->emitted, 0, sizeof(sctx->emitted));
}
+
+void si_pm4_cleanup(struct si_context *sctx)
+{
+ for (int i = 0; i < NUMBER_OF_STATES; ++i) {
+ si_pm4_free_state(sctx, sctx->queued.array[i], i);
+ }
+}