diff options
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index c894972904..d8d5821a1d 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -58,16 +58,14 @@ static INLINE struct pipe_texture * trace_texture_unwrap(struct trace_context *tr_ctx, struct pipe_texture *texture) { - struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); struct trace_texture *tr_tex; if(!texture) return NULL; - tr_tex = trace_texture(tr_scr, texture); + tr_tex = trace_texture(texture); assert(tr_tex->texture); - assert(tr_tex->texture->screen == tr_scr->screen); return tr_tex->texture; } @@ -77,7 +75,6 @@ trace_surface_unwrap(struct trace_context *tr_ctx, struct pipe_surface *surface) { struct trace_screen *tr_scr = trace_screen(tr_ctx->base.screen); - struct trace_texture *tr_tex; struct trace_surface *tr_surf; if(!surface) @@ -87,8 +84,7 @@ trace_surface_unwrap(struct trace_context *tr_ctx, if(!surface->texture) return surface; - tr_tex = trace_texture(tr_scr, surface->texture); - tr_surf = trace_surface(tr_tex, surface); + tr_surf = trace_surface(surface); assert(tr_surf->surface); assert(tr_surf->surface->texture->screen == tr_scr->screen); @@ -973,21 +969,23 @@ trace_context_surface_fill(struct pipe_context *_pipe, static INLINE void trace_context_clear(struct pipe_context *_pipe, - struct pipe_surface *surface, - unsigned clearValue) + unsigned buffers, + const float *rgba, + double depth, + unsigned stencil) { struct trace_context *tr_ctx = trace_context(_pipe); struct pipe_context *pipe = tr_ctx->pipe; - surface = trace_surface_unwrap(tr_ctx, surface); - trace_dump_call_begin("pipe_context", "clear"); trace_dump_arg(ptr, pipe); - trace_dump_arg(ptr, surface); - trace_dump_arg(uint, clearValue); + trace_dump_arg(uint, buffers); + trace_dump_arg_array(float, rgba, 4); + trace_dump_arg(float, depth); + trace_dump_arg(uint, stencil); - pipe->clear(pipe, surface, clearValue);; + pipe->clear(pipe, buffers, rgba, depth, stencil); trace_dump_call_end(); } @@ -1037,9 +1035,9 @@ struct pipe_context * trace_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) { - struct trace_screen *tr_scr = trace_screen(_screen); + struct trace_screen *tr_scr; struct trace_context *tr_ctx; - struct pipe_screen *screen = tr_scr->screen; + struct pipe_screen *screen; if(!pipe) goto error1; @@ -1047,6 +1045,9 @@ trace_context_create(struct pipe_screen *_screen, if(!trace_dump_enabled()) goto error1; + tr_scr = trace_screen(_screen); + screen = tr_scr->screen; + tr_ctx = CALLOC_STRUCT(trace_context); if(!tr_ctx) goto error1; |