summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r--src/gallium/drivers/trace/tr_context.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 5a9f0fc6901..34ceaa41c15 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1236,12 +1236,10 @@ static const struct debug_named_value rbug_blocker_flags[] = {
};
struct pipe_context *
-trace_context_create(struct pipe_screen *_screen,
+trace_context_create(struct trace_screen *tr_scr,
struct pipe_context *pipe)
{
- struct trace_screen *tr_scr;
struct trace_context *tr_ctx;
- struct pipe_screen *screen;
if(!pipe)
goto error1;
@@ -1249,13 +1247,13 @@ trace_context_create(struct pipe_screen *_screen,
if(!trace_enabled())
goto error1;
- tr_scr = trace_screen(_screen);
- screen = tr_scr->screen;
-
tr_ctx = CALLOC_STRUCT(trace_context);
if(!tr_ctx)
goto error1;
+ tr_ctx->base.winsys = NULL;
+ tr_ctx->base.priv = pipe->priv; /* expose wrapped priv data */
+ tr_ctx->base.screen = &tr_scr->base;
tr_ctx->draw_blocker = debug_get_flags_option("RBUG_BLOCK",
rbug_blocker_flags,
0);
@@ -1264,8 +1262,6 @@ trace_context_create(struct pipe_screen *_screen,
pipe_mutex_init(tr_ctx->list_mutex);
make_empty_list(&tr_ctx->shaders);
- tr_ctx->base.winsys = _screen->winsys;
- tr_ctx->base.screen = _screen;
tr_ctx->base.destroy = trace_context_destroy;
tr_ctx->base.draw_arrays = trace_context_draw_arrays;
tr_ctx->base.draw_elements = trace_context_draw_elements;
@@ -1316,11 +1312,6 @@ trace_context_create(struct pipe_screen *_screen,
tr_ctx->pipe = pipe;
- trace_dump_call_begin("", "pipe_context_create");
- trace_dump_arg(ptr, screen);
- trace_dump_ret(ptr, pipe);
- trace_dump_call_end();
-
trace_screen_add_to_list(tr_scr, contexts, tr_ctx);
return &tr_ctx->base;