iris: don't leak sampler state table resources
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jun 2018 17:39:26 +0000 (10:39 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 4d1b3f1aa8c3f18999b7fb539559e8d4f5c5a3c2..8d34de98d8accd9ffc844f2c52d9adee571daa36 100644 (file)
@@ -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);