diff options
author | Bin Jin <bjin1990@gmail.com> | 2014-08-29 20:33:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-29 20:56:03 +0200 |
commit | 225f2e67b718bab842f4c4553c5ca9f8a6cebb47 (patch) | |
tree | a0e2fa44d70ca00ca3af2339c84ce603dde40e7f /video/out/gl_video.c | |
parent | a8299cec2974836d5ea615cc2d12284ac2aca5c4 (diff) | |
download | mpv-225f2e67b718bab842f4c4553c5ca9f8a6cebb47.tar.bz2 mpv-225f2e67b718bab842f4c4553c5ca9f8a6cebb47.tar.xz |
vo_opengl: remove macro operator from shader
Removes '##' operator from OpenGL shader code.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r-- | video/out/gl_video.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 5cf832d201..e2b64968ce 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -826,9 +826,9 @@ static void shader_setup_scaler(char **shader, struct scaler *scaler, int pass) { const char *target = scaler->index == 0 ? "SAMPLE_L" : "SAMPLE_C"; if (!scaler->kernel) { - *shader = talloc_asprintf_append(*shader, "#define %s sample_%s_%c\n", - target, scaler->name, - "lc"[scaler->index]); + *shader = talloc_asprintf_append(*shader, "#define %s(p0, p1, p2) " + "sample_%s(p0, p1, p2, filter_param1_%c)\n", + target, scaler->name, "lc"[scaler->index]); } else { int size = scaler->kernel->size; if (pass != -1) { @@ -1033,13 +1033,13 @@ static void compile_shaders(struct gl_video *p) // Force using the luma scaler on chroma. If the "indirect" stage is // used, the actual scaling will happen in the next stage. shader_def(&header_conv, "SAMPLE_C", - use_indirect ? "sample_bilinear_l" : "SAMPLE_L"); + use_indirect ? "SAMPLE_BILINEAR" : "SAMPLE_L"); } if (use_indirect) { // We don't use filtering for the Y-plane (luma), because it's never // scaled in this scenario. - shader_def(&header_conv, "SAMPLE_L", "sample_bilinear_l"); + shader_def(&header_conv, "SAMPLE_L", "SAMPLE_BILINEAR"); shader_def_opt(&header_conv, "FIXED_SCALE", true); header_conv = t_concat(tmp, header, header_conv); p->indirect_program = |