[v3,6/6] gallium/auxiliary/vl: Add video compute shader render

Submitted by Zhu, James on Feb. 7, 2019, 4:37 p.m.

Details

Message ID 1549557441-17215-7-git-send-email-James.Zhu@amd.com
State New
Headers show
Series "Add compute shader support on video compositor render" ( rev: 10 9 8 7 6 5 4 3 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhu, James Feb. 7, 2019, 4:37 p.m.
Add video compute shader render and set it to default when
pipe support it.

Signed-off-by: James Zhu <James.Zhu@amd.com>

Reviewed-by: Christian K├Ânig <christian.koenig@amd.com>

---
 src/gallium/auxiliary/vl/vl_compositor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.7.4

Patch hide | download patch | download mbox

diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index da4b02d..5308887 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -730,7 +730,12 @@  vl_compositor_render(struct vl_compositor_state *s,
                      bool                        clear_dirty)
 {
    assert(s);
-   vl_compositor_gfx_render(s, c, dst_surface, dirty_area, clear_dirty);
+
+   if (c->pipe->screen->get_param(c->pipe->screen, PIPE_CAP_COMPUTE) &&
+       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