From 0c84ee01d5387e7c59d97de71046d173e4c3461a Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 20 Jul 2017 11:26:01 +0200 Subject: vo_opengl: support user compute shaders These are identical to regular fragment shader hooks, but with extra metadata indicating the preferred block size. --- video/out/opengl/user_shaders.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'video/out/opengl/user_shaders.c') diff --git a/video/out/opengl/user_shaders.c b/video/out/opengl/user_shaders.c index 427295b0ad..718034fa2d 100644 --- a/video/out/opengl/user_shaders.c +++ b/video/out/opengl/user_shaders.c @@ -269,6 +269,14 @@ bool parse_user_shader_pass(struct mp_log *log, struct bstr *body, continue; } + if (bstr_eatstart0(&line, "COMPUTE")) { + if (bstr_sscanf(line, "%d %d", &out->compute_w, &out->compute_h) != 2) { + mp_err(log, "Error while parsing COMPUTE!\n"); + return false; + } + continue; + } + // Unknown command type mp_err(log, "Unrecognized command '%.*s'!\n", BSTR_P(line)); return false; -- cgit v1.2.3