[Mesa-dev] [PATCH] ddebug: add missing pipe_context::clear_texture()

Nicolai Hähnle nhaehnle at gmail.com
Sun Oct 9 19:49:06 UTC 2016


On 09.10.2016 21:19, Samuel Pitoiset wrote:
> This fixes a crash while replaying a trace from F1 2015.

I think clear_texture should be handled in dd_draw.c with the draw and 
other clear functions.

Nicolai

>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/ddebug/dd_context.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
> index edcbf2c..5e4cebe 100644
> --- a/src/gallium/drivers/ddebug/dd_context.c
> +++ b/src/gallium/drivers/ddebug/dd_context.c
> @@ -748,6 +748,16 @@ dd_context_dump_debug_state(struct pipe_context *_pipe, FILE *stream,
>     return pipe->dump_debug_state(pipe, stream, flags);
>  }
>
> +static void
> +dd_context_clear_texture(struct pipe_context *_pipe, struct pipe_resource *res,
> +                         unsigned level, const struct pipe_box *box,
> +                         const void *data)
> +{
> +   struct pipe_context *pipe = dd_context(_pipe)->pipe;
> +
> +   pipe->clear_texture(pipe, res, level, box, data);
> +}
> +
>  struct pipe_context *
>  dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
>  {
> @@ -847,6 +857,7 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
>     CTX_INIT(set_device_reset_callback);
>     CTX_INIT(dump_debug_state);
>     CTX_INIT(emit_string_marker);
> +   CTX_INIT(clear_texture);
>
>     dd_init_draw_functions(dctx);
>
>


More information about the mesa-dev mailing list