trace: Prevent from internal calls from pipe_context to pipe_screen from being traced.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 8 Aug 2008 11:31:23 +0000 (12:31 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 8 Aug 2008 11:32:23 +0000 (12:32 +0100)
src/gallium/drivers/trace/tr_context.c

index ee8ad5eb97c9504e7129309cfd3baf0c1905bf26..242a03ccb04b5f6724f67fb0f213e24ce2361809 100644 (file)
@@ -999,11 +999,14 @@ trace_context_destroy(struct pipe_context *_pipe)
 struct pipe_context *
 trace_context_create(struct pipe_context *pipe)
 {
+   struct trace_screen *tr_scr;
    struct trace_context *tr_ctx;
    
    if(!debug_get_bool_option("GALLIUM_TRACE", FALSE))
       return pipe;
    
+   tr_scr = trace_screen(pipe->screen);
+   
    tr_ctx = CALLOC_STRUCT(trace_context);
    if(!tr_ctx)
       return NULL;
@@ -1055,5 +1058,8 @@ trace_context_create(struct pipe_context *pipe)
 
    tr_ctx->pipe = pipe;
    
+   /* We don't want to trace the pipe calls */
+   pipe->screen = tr_scr->screen;
+   
    return &tr_ctx->base;
 }