summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2016-08-14 14:03:58 +0200
committerMathias Fröhlich <[email protected]>2016-08-15 07:10:39 +0200
commit84984b998632a17b373c7be2441c764879a6cae5 (patch)
tree768c60aadac1c5674b31bed7e1e6729761cb234b
parent72f1566f90c434c7752d8405193eec68d6743246 (diff)
vbo: Remove always true return from vbo_bind_arrays.
Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/vbo/vbo.h2
-rw-r--r--src/mesa/vbo/vbo_exec_array.c36
2 files changed, 12 insertions, 26 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 939a3a6f224..73478e666dc 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -197,7 +197,7 @@ void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func);
void vbo_set_indirect_draw_func(struct gl_context *ctx,
vbo_indirect_draw_func func);
-bool vbo_bind_arrays(struct gl_context *ctx);
+void vbo_bind_arrays(struct gl_context *ctx);
size_t
vbo_count_tessellated_primitives(GLenum mode, GLuint count,
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index bfa9cd6447e..2fee50b8bfc 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -369,7 +369,7 @@ recalculate_input_bindings(struct gl_context *ctx)
* Note that this might set the _NEW_VARYING_VP_INPUTS dirty flag so state
* validation must be done after this call.
*/
-bool
+void
vbo_bind_arrays(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
@@ -395,8 +395,6 @@ vbo_bind_arrays(struct gl_context *ctx)
exec->validating = GL_FALSE;
}
}
-
- return true;
}
/**
@@ -412,8 +410,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_prim prim[2];
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
/* init most fields to zero */
memset(prim, 0, sizeof(prim));
@@ -762,8 +759,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
struct _mesa_index_buffer ib;
struct _mesa_prim prim[1];
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
ib.count = count;
ib.type = type;
@@ -1106,10 +1102,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
return;
}
- if (!vbo_bind_arrays(ctx)) {
- free(prim);
- return;
- }
+ vbo_bind_arrays(ctx);
min_index_ptr = (uintptr_t)indices[0];
max_index_ptr = 0;
@@ -1273,8 +1266,7 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
return;
}
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
/* init most fields to zero */
memset(prim, 0, sizeof(prim));
@@ -1370,8 +1362,7 @@ vbo_validated_drawarraysindirect(struct gl_context *ctx,
{
struct vbo_context *vbo = vbo_context(ctx);
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
vbo->draw_indirect_prims(ctx, mode,
ctx->DrawIndirectBuffer, (GLsizeiptr)indirect,
@@ -1394,8 +1385,7 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,
if (primcount == 0)
return;
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
vbo->draw_indirect_prims(ctx, mode,
ctx->DrawIndirectBuffer, offset,
@@ -1414,8 +1404,7 @@ vbo_validated_drawelementsindirect(struct gl_context *ctx,
struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
ib.count = 0; /* unknown */
ib.type = type;
@@ -1445,8 +1434,7 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,
if (primcount == 0)
return;
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
/* NOTE: IndexBufferObj is guaranteed to be a VBO. */
@@ -1566,8 +1554,7 @@ vbo_validated_multidrawarraysindirectcount(struct gl_context *ctx,
if (maxdrawcount == 0)
return;
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
vbo->draw_indirect_prims(ctx, mode,
ctx->DrawIndirectBuffer, offset,
@@ -1594,8 +1581,7 @@ vbo_validated_multidrawelementsindirectcount(struct gl_context *ctx,
if (maxdrawcount == 0)
return;
- if (!vbo_bind_arrays(ctx))
- return;
+ vbo_bind_arrays(ctx);
/* NOTE: IndexBufferObj is guaranteed to be a VBO. */