diff options
author | wm4 <wm4@nowhere> | 2015-11-09 16:24:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-09 16:24:01 +0100 |
commit | eeb5f987585b47b2d5828cac0f2d90e0c503ce4c (patch) | |
tree | 5b359aa42f70f15811d74272af735fb3f127df27 /video/out/opengl/nnedi3.c | |
parent | caa497ee8af7ceab2a1e0a1df4e06ff467e5fd1d (diff) | |
download | mpv-eeb5f987585b47b2d5828cac0f2d90e0c503ce4c.tar.bz2 mpv-eeb5f987585b47b2d5828cac0f2d90e0c503ce4c.tar.xz |
vo_opengl: handle GL_ARB_uniform_buffer_object with low GLSL versions
Why is this stupid crap being so much a pain for no reason.
Diffstat (limited to 'video/out/opengl/nnedi3.c')
-rw-r--r-- | video/out/opengl/nnedi3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/nnedi3.c b/video/out/opengl/nnedi3.c index fb704d2ab6..f757324608 100644 --- a/video/out/opengl/nnedi3.c +++ b/video/out/opengl/nnedi3.c @@ -80,7 +80,7 @@ const float* get_nnedi3_weights(const struct nnedi3_opts *conf, int *size) return (const float*)(nnedi3_weights + offset * 4); } -void pass_nnedi3(struct gl_shader_cache *sc, int planes, int tex_num, +void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num, int step, const struct nnedi3_opts *conf, struct gl_transform *transform) { @@ -108,6 +108,8 @@ void pass_nnedi3(struct gl_shader_cache *sc, int planes, int tex_num, snprintf(buf, sizeof(buf), "vec4 weights[%d];", neurons * (sample_count * 2 + 1)); gl_sc_uniform_buffer(sc, "NNEDI3_WEIGHTS", buf, 0); + if (gl->glsl_version < 140) + gl_sc_enable_extension(sc, "GL_ARB_uniform_buffer_object"); } else if (conf->upload == NNEDI3_UPLOAD_SHADER) { // Somehow necessary for hard coding approach. GLSLH(#pragma optionNV(fastprecision on)) |