diff options
author | wm4 <wm4@nowhere> | 2016-04-05 20:57:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-05 20:57:02 +0200 |
commit | afd685490dfccd4eb5980a93e4e8f053d45b2b3f (patch) | |
tree | 16d5d7cbaf6fd05fd3cbc58042c7f915e801162d | |
parent | da3489353bce9e47ab7786c4798f774b0a61340d (diff) | |
download | mpv-afd685490dfccd4eb5980a93e4e8f053d45b2b3f.tar.bz2 mpv-afd685490dfccd4eb5980a93e4e8f053d45b2b3f.tar.xz |
vo_opengl: fix nnedi + rectangle textures
Shader compilation error due to incompatible samplers.
-rw-r--r-- | video/out/opengl/nnedi3.c | 4 | ||||
-rw-r--r-- | video/out/opengl/nnedi3.h | 2 | ||||
-rw-r--r-- | video/out/opengl/video.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/video/out/opengl/nnedi3.c b/video/out/opengl/nnedi3.c index 702a8dd55f..68a90cab42 100644 --- a/video/out/opengl/nnedi3.c +++ b/video/out/opengl/nnedi3.c @@ -98,7 +98,7 @@ const float* get_nnedi3_weights(const struct nnedi3_opts *conf, int *size) void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num, int step, float tex_mul, const struct nnedi3_opts *conf, - struct gl_transform *transform) + struct gl_transform *transform, GLenum tex_target) { assert(0 <= step && step < 2); @@ -131,7 +131,7 @@ void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num, GLSLH(#pragma optionNV(fastprecision on)) } - GLSLHF("float nnedi3(sampler2D tex, vec2 pos, vec2 tex_size, vec2 pixel_size, int plane, float tex_mul) {\n"); + GLSLHF("float nnedi3(%s tex, vec2 pos, vec2 tex_size, vec2 pixel_size, int plane, float tex_mul) {\n", mp_sampler_type(tex_target)); if (step == 0) { *transform = (struct gl_transform){{{1.0,0.0}, {0.0,2.0}}, {0.0,-0.5}}; diff --git a/video/out/opengl/nnedi3.h b/video/out/opengl/nnedi3.h index b75094a7e4..c3895a0773 100644 --- a/video/out/opengl/nnedi3.h +++ b/video/out/opengl/nnedi3.h @@ -40,6 +40,6 @@ const float* get_nnedi3_weights(const struct nnedi3_opts *conf, int *size); void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num, int step, float tex_mul, const struct nnedi3_opts *conf, - struct gl_transform *transform); + struct gl_transform *transform, GLenum tex_target); #endif diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index c2d5fc211d..f9ff6aec4e 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1412,7 +1412,7 @@ static void pass_prescale_luma(struct gl_video *p, struct img_tex *tex, case 2: upload_nnedi3_weights(p); pass_nnedi3(p->gl, p->sc, planes, id, step, tex->multiplier, - p->opts.nnedi3_opts, &step_transform); + p->opts.nnedi3_opts, &step_transform, tex->gl_target); break; default: abort(); |