diff options
author | wm4 <wm4@nowhere> | 2014-08-28 00:40:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-28 00:40:37 +0200 |
commit | 2c99464b475d01e1fb3f96904dc905eef6197008 (patch) | |
tree | 184495d71aa5536bbb54e6a82b4d7ad4e4f62ee4 /video/out/gl_video_shaders.glsl | |
parent | f8a1bd1253fdc6076415e67e006ab99a2cae568e (diff) | |
download | mpv-2c99464b475d01e1fb3f96904dc905eef6197008.tar.bz2 mpv-2c99464b475d01e1fb3f96904dc905eef6197008.tar.xz |
vo_opengl: fix shader
Regression since commit f14722a4. For some reason, this worked on
nvidia, but rightfully failed on mesa.
At least in C, the ## operator indeed needs two macro arguments, and
you can't just concatenate with non-arguments.
This change will most likely fix it.
CC: @bjin
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r-- | video/out/gl_video_shaders.glsl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl index 3d9d9bf07a..6e135f0d11 100644 --- a/video/out/gl_video_shaders.glsl +++ b/video/out/gl_video_shaders.glsl @@ -352,13 +352,15 @@ vec4 sample_sharpen5(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord, float param return p + t * param1; } -#define SAMPLE_FILTER_LC(NAME) \ - vec4 NAME##_l(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord) { \ - return NAME(tex, texsize, texcoord, filter_param1_l); \ - } \ - \ - vec4 NAME##_c(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord) { \ - return NAME(tex, texsize, texcoord, filter_param1_c); \ +#define CONCAT(a, b) a ## b + +#define SAMPLE_FILTER_LC(NAME) \ + vec4 CONCAT(NAME, _l)(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord) { \ + return NAME(tex, texsize, texcoord, filter_param1_l); \ + } \ + \ + vec4 CONCAT(NAME, _c)(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord) { \ + return NAME(tex, texsize, texcoord, filter_param1_c); \ } SAMPLE_FILTER_LC(sample_bilinear) |