summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-06-27 14:09:05 -0700
committerKenneth Graunke <[email protected]>2019-06-27 14:59:39 -0700
commit3d3685d3548f7e4fbabafb5b3a184486a5274c23 (patch)
treef088d222a684322d73556c4d0599f67eeac44e67 /src
parentd65819f05454fb7dd06d40877f67fc6cb6bf693a (diff)
iris: Fix memory leak of SO targets
We need to pitch these on context destroy.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 8d7b2557b76..f1c4a6f7874 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -5624,6 +5624,10 @@ iris_destroy_state(struct iris_context *ice)
}
free(ice->state.genx);
+ for (int i = 0; i < 4; i++) {
+ pipe_so_target_reference(&ice->state.so_target[i], NULL);
+ }
+
for (unsigned i = 0; i < ice->state.framebuffer.nr_cbufs; i++) {
pipe_surface_reference(&ice->state.framebuffer.cbufs[i], NULL);
}