aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-08-09 11:53:56 +0100
committerJosé Fonseca <[email protected]>2008-08-09 14:10:25 +0100
commit376f2cbb190389807c8ba6df401e06743ead9eb8 (patch)
tree6f8a51d1edbdc091c39cf01a1905b5359ef62be6 /src/gallium/drivers
parentdc31bb5076df914ad16e063fdcc46fd2ecba9dbb (diff)
trace: Prevent tracing internal pipe driver calls.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/trace/tr_context.c9
-rw-r--r--src/gallium/drivers/trace/tr_screen.c3
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 242a03ccb04..47a217ec7c7 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -30,6 +30,7 @@
#include "tr_stream.h"
#include "tr_dump.h"
#include "tr_state.h"
+#include "tr_winsys.h"
#include "tr_screen.h"
#include "tr_context.h"
@@ -999,14 +1000,11 @@ 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;
@@ -1058,8 +1056,9 @@ 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;
+ /* We don't want to trace the internal pipe calls */
+ pipe->winsys = trace_winsys(pipe->winsys)->winsys;
+ pipe->screen = trace_screen(pipe->screen)->screen;
return &tr_ctx->base;
}
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index b40d56bcff3..de885abae2c 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -376,5 +376,8 @@ trace_screen_create(struct pipe_screen *screen)
if(!tr_scr->stream)
return NULL;
+ /* We don't want to trace the internal pipe calls */
+ screen->winsys = trace_winsys(screen->winsys)->winsys;
+
return &tr_scr->base;
}