From: Kenneth Graunke Date: Sat, 16 Jun 2018 17:39:26 +0000 (-0700) Subject: iris: don't leak sampler state table resources X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d504f3d52a142d72bebce8d0e9221a88b9d0b73;p=mesa.git iris: don't leak sampler state table resources --- 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);