llvmpipe: stop using pipe_sampler_view_release()
authorBrian Paul <brianp@vmware.com>
Fri, 8 Mar 2019 21:08:13 +0000 (14:08 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 18 Mar 2019 02:07:22 +0000 (20:07 -0600)
This was used to avoid freeing a sampler view which was created by a
context that was already deleted.  But the state tracker does not
allow that.

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/llvmpipe/lp_state_sampler.c

index c9aba1a8594a3025b084550a0cad4ad46c7f7907..72823e4c84a28636d7d1751779d1bda6981685d7 100644 (file)
@@ -123,12 +123,6 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe,
 
    /* set the new sampler views */
    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,
-                                &llvmpipe->sampler_views[shader][start + i]);
       /*
        * Warn if someone tries to set a view created in a different context
        * (which is why we need the hack above in the first place).