summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-17 10:48:05 +0200
committerwm4 <wm4@nowhere>2016-05-17 10:48:05 +0200
commita2d58d9986e8e2289006d932ca4aa6eaad779dd1 (patch)
tree35c4eb85f31edc3dd91a245715b95c354e78be15
parentf00040b9fcc1be42963c70cd772da2360f3d9585 (diff)
downloadmpv-a2d58d9986e8e2289006d932ca4aa6eaad779dd1.tar.bz2
mpv-a2d58d9986e8e2289006d932ca4aa6eaad779dd1.tar.xz
vo_opengl: move UT_buffer to switch handling
No reason to make it a special case.
-rw-r--r--video/out/opengl/utils.c10
1 files changed, 5 insertions, 5 deletions
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();
}