From 7d504f3d52a142d72bebce8d0e9221a88b9d0b73 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 16 Jun 2018 10:39:26 -0700 Subject: [PATCH] iris: don't leak sampler state table resources --- src/gallium/drivers/iris/iris_state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 4d1b3f1aa8c..8d34de98d8a 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2763,6 +2763,9 @@ iris_destroy_state(struct iris_context *ice) } pipe_surface_reference(&ice->state.framebuffer.zsbuf, NULL); + for (int stage = 0; stage < MESA_SHADER_STAGES; stage++) { + pipe_resource_reference(&ice->state.sampler_table_resource[stage], NULL); + } free(ice->state.cso_vp); free(ice->state.cso_depthbuffer); -- 2.30.2