On Fri, Feb 8, 2019, 2:09 PM James Zhu <jam...@amd.com wrote: > I combined patch5 and 6 into one patch. create compute shader only when > pipe support it. > That's fine. I only requested additional changes.
Marek James. > On 2019-02-08 12:29 p.m., Marek Olšák wrote: > > If compute is used, graphics shaders don't need to be created. > > Marek > > On Fri, Feb 8, 2019 at 9:02 AM James Zhu <jam...@amd.com> wrote: > >> >> On 2019-02-08 6:33 a.m., Emil Velikov wrote: >> > On Thu, 7 Feb 2019 at 16:37, Zhu, James <james....@amd.com> wrote: >> >> Add compute shader initilization, assign and cleanup in vl_compositor >> API. >> >> >> >> Signed-off-by: James Zhu <james....@amd.com> >> >> Reviewed-by: Christian König <christian.koe...@amd.com> >> >> --- >> >> src/gallium/auxiliary/vl/vl_compositor.c | 31 >> ++++++++++++++++++++++++++++++- >> >> src/gallium/auxiliary/vl/vl_compositor.h | 3 +++ >> >> 2 files changed, 33 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/src/gallium/auxiliary/vl/vl_compositor.c >> b/src/gallium/auxiliary/vl/vl_compositor.c >> >> index 4509913..da4b02d 100644 >> >> --- a/src/gallium/auxiliary/vl/vl_compositor.c >> >> +++ b/src/gallium/auxiliary/vl/vl_compositor.c >> >> @@ -28,12 +28,31 @@ >> >> #include "util/u_sampler.h" >> >> >> >> #include "vl_compositor_gfx.h" >> >> +#include "vl_compositor_cs.h" >> >> >> >> static bool >> >> init_shaders(struct vl_compositor *c) >> >> { >> >> assert(c); >> >> >> >> + c->cs_video_buffer = vl_compositor_cs_create_shader(c, >> compute_shader_video_buffer); >> >> + if (!c->cs_video_buffer) { >> >> + debug_printf("Unable to create video_buffer compute shader.\n"); >> >> + return false; >> >> + } >> >> + >> >> + c->cs_weave_rgb = vl_compositor_cs_create_shader(c, >> compute_shader_weave); >> >> + if (!c->cs_weave_rgb) { >> >> + debug_printf("Unable to create weave_rgb compute shader.\n"); >> >> + return false; >> >> + } >> >> + >> >> + c->cs_rgba = vl_compositor_cs_create_shader(c, >> compute_shader_rgba); >> >> + if (!c->cs_rgba) { >> >> + debug_printf("Unable to create RGB-to-RGB compute shader.\n"); >> >> + return false; >> >> + } >> >> + >> > This constructs compute shaders even when we don't need them. >> > Can we have this behind a flag - say cs_compositor_render_enable or >> > something else? >> >> Yeah, I can add PIPE_CAP_COMPUTE check. >> >> James >> >> > >> > -Emil >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev >> >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev