From: Charmaine Lee Date: Wed, 7 Sep 2016 18:46:26 +0000 (-0700) Subject: svga: fix memory leak with sampler state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5947d9083038683618eb69c9e624e185069df794;p=mesa.git svga: fix memory leak with sampler state This patch fixes a memory leak with sampler state when piglit is run with HW version 11. Sampler state clean up was incorrectly skipped in svga_cleanup_sampler_state() for vgpu9. Tested with piglit. Reviewed-by: Neha Bhende Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 5d7af701ad4..0c53c1d2645 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -531,9 +531,6 @@ svga_cleanup_sampler_state(struct svga_context *svga) { enum pipe_shader_type shader; - if (!svga_have_vgpu10(svga)) - return; - for (shader = 0; shader <= PIPE_SHADER_GEOMETRY; shader++) { unsigned i;