Mesa (master): trace: Don't immediately destroy the pipe' s sampler view in the trace driver.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sat Aug 21 09:09:04 UTC 2010


Module: Mesa
Branch: master
Commit: ce3a07c392fb0532f18dcb2d582b41a3f6bf198c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce3a07c392fb0532f18dcb2d582b41a3f6bf198c

Author: Alex Corscadden <alexc at vmware.com>
Date:   Tue Aug 17 13:45:31 2010 -0700

trace: Don't immediately destroy the pipe's sampler view in the trace driver.

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 at vmware.com>

---

 src/gallium/drivers/trace/tr_context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 5d5bb41..9e8a23d 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -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();
 




More information about the mesa-commit mailing list