trace: Don't immediately destroy the pipe's sampler view in the trace driver.
authorAlex Corscadden <alexc@vmware.com>
Tue, 17 Aug 2010 20:45:31 +0000 (13:45 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 21 Aug 2010 08:45:43 +0000 (09:45 +0100)
The trace driver's implementation of sampler_view_destroy was calling
directly into the underlying pipe's sampler_view_destroy implementation.
This causes problems for pipes that keep references to sampler views
even after the state tracker has released them.  Instead, we'll simply
drop the trace driver's reference to the pipe's sampler view.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/trace/tr_context.c

index 5d5bb41d9444bb5946cff7251d3dd8aee7b7f67b..9e8a23d35c75b9b1504ce5f7fa28bf412a0b06df 100644 (file)
@@ -885,7 +885,7 @@ trace_sampler_view_destroy(struct pipe_context *_pipe,
    trace_dump_arg(ptr, pipe);
    trace_dump_arg(ptr, view);
 
-   pipe->sampler_view_destroy(pipe, view);
+   pipe_sampler_view_reference(&tr_view->sampler_view, NULL);
 
    trace_dump_call_end();