summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-03 18:51:51 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-03 18:55:52 +0200
commit2bf094cd55a5526dbdf7cab8d5a4bd3fb867c084 (patch)
tree2af20f7c0d5f8c175088a84d89444bced15e0181
parent5e89aed93460c41c78cc09ac3d7573bec4fa989c (diff)
downloadmpv-2bf094cd55a5526dbdf7cab8d5a4bd3fb867c084.tar.bz2
mpv-2bf094cd55a5526dbdf7cab8d5a4bd3fb867c084.tar.xz
vo_opengl: don't hardcode texmap0 for polar compute
This was an oversight. The ID shouldn't be hard-coded here, so add it to sampler_prelude instead.
-rw-r--r--video/out/opengl/video_shaders.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index 9c836a09d0..a7b253249a 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -29,7 +29,9 @@
void sampler_prelude(struct gl_shader_cache *sc, int tex_num)
{
GLSLF("#undef tex\n");
+ GLSLF("#undef texmap\n");
GLSLF("#define tex texture%d\n", tex_num);
+ GLSLF("#define texmap texmap%d\n", tex_num);
GLSLF("vec2 pos = texcoord%d;\n", tex_num);
GLSLF("vec2 size = texture_size%d;\n", tex_num);
GLSLF("vec2 pt = pixel_size%d;\n", tex_num);
@@ -227,7 +229,7 @@ void pass_compute_polar(struct gl_shader_cache *sc, struct scaler *scaler,
GLSL(color = vec4(0.0);)
GLSLF("{\n");
- GLSL(vec2 wpos = texmap0(gl_WorkGroupID * gl_WorkGroupSize);)
+ GLSL(vec2 wpos = texmap(gl_WorkGroupID * gl_WorkGroupSize);)
GLSL(vec2 wbase = wpos - pt * fract(wpos * size - vec2(0.5));)
GLSL(vec2 fcoord = fract(pos * size - vec2(0.5));)
GLSL(vec2 base = pos - pt * fcoord;)