i915g: remove calls to pipe_sampler_view_release()
authorBrian Paul <brianp@vmware.com>
Fri, 8 Mar 2019 22:20:16 +0000 (15:20 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 18 Mar 2019 02:07:22 +0000 (20:07 -0600)
As with previous patches for svga, llvmpipe, swr drivers.
Compile tested only.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-By: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/i915/i915_state.c

index ddc27098de2533ef52f93f8caa0cd66721bf2b78..03d218e984ecf8b50630b2c37c4ba6d9d690e3f5 100644 (file)
@@ -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;