[Mesa-dev] [PATCH 6/6] gallium\auxiliary\vl: Add video compute shader render

Christian König ckoenig.leichtzumerken at gmail.com
Fri Feb 1 16:38:37 UTC 2019


Am 01.02.19 um 17:28 schrieb Zhu, James:
> Add video compute shader render. export CS_COMPOSITOR_RENDER=true
> to enable video compute shader render.

Ok that actually makes more sense, but I would either put everything 
into one file or cleanly separate between gfx and compute implementation.

Christian.

>
> Signed-off-by: James Zhu <James.Zhu at amd.com>
> ---
>   src/gallium/auxiliary/vl/vl_compositor.c | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
> index 7ee8402..66a8fc9 100644
> --- a/src/gallium/auxiliary/vl/vl_compositor.c
> +++ b/src/gallium/auxiliary/vl/vl_compositor.c
> @@ -1376,8 +1376,8 @@ vl_compositor_convert_rgb_to_yuv(struct vl_compositor_state *s,
>      s->pipe->flush(s->pipe, NULL, 0);
>   }
>   
> -void
> -vl_compositor_render(struct vl_compositor_state *s,
> +static void
> +vl_compositor_gfx_render(struct vl_compositor_state *s,
>                        struct vl_compositor       *c,
>                        struct pipe_surface        *dst_surface,
>                        struct u_rect              *dirty_area,
> @@ -1419,6 +1419,21 @@ vl_compositor_render(struct vl_compositor_state *s,
>      draw_layers(c, s, dirty_area);
>   }
>   
> +void
> +vl_compositor_render(struct vl_compositor_state *s,
> +                     struct vl_compositor       *c,
> +                     struct pipe_surface        *dst_surface,
> +                     struct u_rect              *dirty_area,
> +                     bool                        clear_dirty)
> +{
> +   assert(s);
> +
> +   if (cs_compositor_render_enable && s->layers->cs)
> +      vl_compositor_cs_render(s, c, dst_surface, dirty_area, clear_dirty);
> +   else
> +      vl_compositor_gfx_render(s, c, dst_surface, dirty_area, clear_dirty);
> +}
> +
>   bool
>   vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe)
>   {



More information about the mesa-dev mailing list