[Mesa-dev] [PATCH 6/6] gallium\auxiliary\vl: Add video compute shader render
Zhu, James
James.Zhu at amd.com
Fri Feb 1 16:28:38 UTC 2019
Add video compute shader render. export CS_COMPOSITOR_RENDER=true
to enable video compute shader render.
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)
{
--
2.7.4
More information about the mesa-dev
mailing list