From a2d58d9986e8e2289006d932ca4aa6eaad779dd1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 17 May 2016 10:48:05 +0200 Subject: vo_opengl: move UT_buffer to switch handling No reason to make it a special case. --- video/out/opengl/utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'video/out/opengl') diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c index a311a496a4..dd23e9724e 100644 --- a/video/out/opengl/utils.c +++ b/video/out/opengl/utils.c @@ -749,11 +749,6 @@ static const char *vao_glsl_type(const struct gl_vao_entry *e) // Assumes program is current (gl->UseProgram(program)). static void update_uniform(GL *gl, struct sc_entry *e, struct sc_uniform *u, int n) { - if (u->type == UT_buffer) { - GLuint idx = gl->GetUniformBlockIndex(e->gl_shader, u->name); - gl->UniformBlockBinding(e->gl_shader, idx, u->v.buffer.binding); - return; - } struct sc_cached_uniform *un = &e->uniforms[n]; GLint loc = un->loc; if (loc < 0) @@ -789,6 +784,11 @@ static void update_uniform(GL *gl, struct sc_entry *e, struct sc_uniform *u, int } } break; + case UT_buffer: { + GLuint idx = gl->GetUniformBlockIndex(e->gl_shader, u->name); + gl->UniformBlockBinding(e->gl_shader, idx, u->v.buffer.binding); + break; + } default: abort(); } -- cgit v1.2.3