From c473090b099bd2100363cb672e56edeb8579aeb5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 8 Mar 2019 15:20:16 -0700 Subject: [PATCH] i915g: remove calls to pipe_sampler_view_release() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As with previous patches for svga, llvmpipe, swr drivers. Compile tested only. Reviewed-by: Roland Scheidegger Reviewed-by: Neha Bhende Reviewed-by: Mathias Fröhlich Reviewed-By: Jose Fonseca --- src/gallium/drivers/i915/i915_state.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index ddc27098de2..03d218e984e 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -745,17 +745,11 @@ static void i915_set_fragment_sampler_views(struct pipe_context *pipe, return; for (i = 0; i < num; i++) { - /* Note: we're using pipe_sampler_view_release() here to work around - * a possible crash when the old view belongs to another context that - * was already destroyed. - */ - pipe_sampler_view_release(pipe, &i915->fragment_sampler_views[i]); - pipe_sampler_view_reference(&i915->fragment_sampler_views[i], - views[i]); + pipe_sampler_view_reference(&i915->fragment_sampler_views[i], views[i]); } for (i = num; i < i915->num_fragment_sampler_views; i++) - pipe_sampler_view_release(pipe, &i915->fragment_sampler_views[i]); + pipe_sampler_view_reference(&i915->fragment_sampler_views[i], NULL); i915->num_fragment_sampler_views = num; -- 2.30.2