[Mesa-dev] [PATCH 3/3] gallium/ddebug: Implement launch_grid.

Marek Olšák maraeo at gmail.com
Fri Apr 22 07:16:34 UTC 2016


For patch 1 and 3:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Apr 21, 2016 at 5:42 PM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> Does not implement dumping info.
>
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> ---
>  src/gallium/drivers/ddebug/dd_draw.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
> index 45e4e10..f0c8887 100644
> --- a/src/gallium/drivers/ddebug/dd_draw.c
> +++ b/src/gallium/drivers/ddebug/dd_draw.c
> @@ -35,6 +35,7 @@
>  enum call_type
>  {
>     CALL_DRAW_VBO,
> +   CALL_LAUNCH_GRID,
>     CALL_RESOURCE_COPY_REGION,
>     CALL_BLIT,
>     CALL_FLUSH_RESOURCE,
> @@ -77,6 +78,7 @@ struct dd_call
>
>     union {
>        struct pipe_draw_info draw_vbo;
> +      struct pipe_grid_info launch_grid;
>        struct call_resource_copy_region resource_copy_region;
>        struct pipe_blit_info blit;
>        struct pipe_resource *flush_resource;
> @@ -372,6 +374,13 @@ dd_dump_draw_vbo(struct dd_context *dctx, struct pipe_draw_info *info, FILE *f)
>  }
>
>  static void
> +dd_dump_launch_grid(struct dd_context *dctx, struct pipe_grid_info *info, FILE *f)
> +{
> +   fprintf(f, "%s:\n", __func__+8);
> +   /* TODO */
> +}
> +
> +static void
>  dd_dump_resource_copy_region(struct dd_context *dctx,
>                               struct call_resource_copy_region *info,
>                               FILE *f)
> @@ -485,6 +494,9 @@ dd_dump_call(struct dd_context *dctx, struct dd_call *call, unsigned flags)
>     case CALL_DRAW_VBO:
>        dd_dump_draw_vbo(dctx, &call->info.draw_vbo, f);
>        break;
> +   case CALL_LAUNCH_GRID:
> +      dd_dump_launch_grid(dctx, &call->info.launch_grid, f);
> +      break;
>     case CALL_RESOURCE_COPY_REGION:
>        dd_dump_resource_copy_region(dctx, &call->info.resource_copy_region, f);
>        break;
> @@ -649,6 +661,22 @@ dd_context_draw_vbo(struct pipe_context *_pipe,
>  }
>
>  static void
> +dd_context_launch_grid(struct pipe_context *_pipe,
> +                       const struct pipe_grid_info *info)
> +{
> +   struct dd_context *dctx = dd_context(_pipe);
> +   struct pipe_context *pipe = dctx->pipe;
> +   struct dd_call call;
> +
> +   call.type = CALL_LAUNCH_GRID;
> +   call.info.launch_grid = *info;
> +
> +   dd_before_draw(dctx);
> +   pipe->launch_grid(pipe, info);
> +   dd_after_draw(dctx, &call);
> +}
> +
> +static void
>  dd_context_resource_copy_region(struct pipe_context *_pipe,
>                                  struct pipe_resource *dst, unsigned dst_level,
>                                  unsigned dstx, unsigned dsty, unsigned dstz,
> @@ -789,6 +817,7 @@ dd_init_draw_functions(struct dd_context *dctx)
>  {
>     CTX_INIT(flush);
>     CTX_INIT(draw_vbo);
> +   CTX_INIT(launch_grid);
>     CTX_INIT(resource_copy_region);
>     CTX_INIT(blit);
>     CTX_INIT(clear);
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list