From: Brian Paul Date: Fri, 8 Mar 2019 22:20:16 +0000 (-0700) Subject: i915g: remove calls to pipe_sampler_view_release() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c473090b099bd2100363cb672e56edeb8579aeb5;p=mesa.git i915g: remove calls to pipe_sampler_view_release() 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 --- 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;