Add debug option CS_COMPOSITOR_RENDER to enable/diable video
compositor compute shader render through system environment
variable.

Signed-off-by: James Zhu <james....@amd.com>
---
 src/gallium/auxiliary/vl/vl_compositor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/vl/vl_compositor.c 
b/src/gallium/auxiliary/vl/vl_compositor.c
index 85fbab4..7ee8402 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -52,6 +52,8 @@ enum VS_OUTPUT
    VS_O_VBOTTOM,
 };
 
+static bool cs_compositor_render_enable = FALSE;
+
 static void *
 create_vert_shader(struct vl_compositor *c)
 {
@@ -1422,6 +1424,9 @@ vl_compositor_init(struct vl_compositor *c, struct 
pipe_context *pipe)
 {
    assert(c);
 
+   if (debug_get_bool_option("CS_COMPOSITOR_RENDER", false))
+      cs_compositor_render_enable = true;
+
    memset(c, 0, sizeof(*c));
 
    c->pipe = pipe;
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to