[Mesa-dev] [PATCH 1/2] trace: implement render_condition

Jose Fonseca jfonseca at vmware.com
Sat May 28 23:21:10 PDT 2011


Marek,

The trace patches look good to me.

It would be nice if we used the same name for pipe_context variable, but this is not your fault: tr_context.c and p_context.h itself is already full of inconsistent namings...

Jose

----- Original Message -----
> ---
>  src/gallium/drivers/trace/tr_context.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/src/gallium/drivers/trace/tr_context.c
> b/src/gallium/drivers/trace/tr_context.c
> index 4f0d6c4..14e8b0c 100644
> --- a/src/gallium/drivers/trace/tr_context.c
> +++ b/src/gallium/drivers/trace/tr_context.c
> @@ -1422,6 +1422,25 @@ static void trace_redefine_user_buffer(struct
> pipe_context *_context,
>  }
>  
>  
> +static void trace_render_condition(struct pipe_context *_context,
> +                                   struct pipe_query *query,
> +                                   uint mode)
> +{
> +   struct trace_context *tr_context = trace_context(_context);
> +   struct pipe_context *context = tr_context->pipe;
> +
> +   trace_dump_call_begin("pipe_context", "render_condition");
> +
> +   trace_dump_arg(ptr, context);
> +   trace_dump_arg(ptr, query);
> +   trace_dump_arg(uint, mode);
> +
> +   trace_dump_call_end();
> +
> +   context->render_condition(context, query, mode);
> +}
> +
> +
>  static const struct debug_named_value rbug_blocker_flags[] = {
>     {"before", 1, NULL},
>     {"after", 2, NULL},
> @@ -1499,6 +1518,7 @@ trace_context_create(struct trace_screen
> *tr_scr,
>     tr_ctx->base.clear_render_target =
>     trace_context_clear_render_target;
>     tr_ctx->base.clear_depth_stencil =
>     trace_context_clear_depth_stencil;
>     tr_ctx->base.flush = trace_context_flush;
> +   tr_ctx->base.render_condition = pipe->render_condition ?
> trace_render_condition : NULL;
>  
>     tr_ctx->base.get_transfer = trace_context_get_transfer;
>     tr_ctx->base.transfer_destroy = trace_context_transfer_destroy;
> --
> 1.7.4.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list