summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-09-04 16:05:00 -0700
committerEric Anholt <eric@anholt.net>2014-09-30 11:00:52 -0700
commit2b76ee903187e22c9fa013579004bc5f51c9a6d8 (patch)
treecc5969db161ff218091b0506500c5aecece2333f /src/mesa/vbo/vbo_exec_array.c
parentbcb722d83025a8e25a318611df6ba4e945c9223d (diff)
downloadexternal_mesa3d-2b76ee903187e22c9fa013579004bc5f51c9a6d8.zip
external_mesa3d-2b76ee903187e22c9fa013579004bc5f51c9a6d8.tar.gz
external_mesa3d-2b76ee903187e22c9fa013579004bc5f51c9a6d8.tar.bz2
mesa: Drop the always-software-primitive-restart paths.
The core sw primitive restart code is still around, because i965 uses it in some cases, but there are no drivers that want it on all the time. Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c46
1 files changed, 6 insertions, 40 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 111321b..045dbb5 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -562,38 +562,6 @@ vbo_bind_arrays(struct gl_context *ctx)
}
}
-
-/**
- * Handle a draw case that potentially has primitive restart enabled.
- *
- * If primitive restart is enabled, and PrimitiveRestartInSoftware is
- * set, then vbo_sw_primitive_restart is used to handle the primitive
- * restart case in software.
- */
-static void
-vbo_handle_primitive_restart(struct gl_context *ctx,
- const struct _mesa_prim *prim,
- GLuint nr_prims,
- const struct _mesa_index_buffer *ib,
- GLboolean index_bounds_valid,
- GLuint min_index,
- GLuint max_index)
-{
- struct vbo_context *vbo = vbo_context(ctx);
-
- if (ctx->Const.PrimitiveRestartInSoftware &&
- ctx->Array._PrimitiveRestart &&
- (ib != NULL)) {
- /* Handle primitive restart in software */
- vbo_sw_primitive_restart(ctx, prim, nr_prims, ib, NULL);
- } else {
- /* Call driver directly for draw_prims */
- vbo->draw_prims(ctx, prim, nr_prims, ib,
- index_bounds_valid, min_index, max_index, NULL, NULL);
- }
-}
-
-
/**
* Helper function called by the other DrawArrays() functions below.
* This is where we handle primitive restart for drawing non-indexed
@@ -1011,8 +979,8 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
*/
check_buffers_are_unmapped(exec->array.inputs);
- vbo_handle_primitive_restart(ctx, prim, 1, &ib,
- index_bounds_valid, start, end);
+ vbo->draw_prims(ctx, prim, 1, &ib,
+ index_bounds_valid, start, end, NULL, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
@@ -1372,8 +1340,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
}
check_buffers_are_unmapped(exec->array.inputs);
- vbo_handle_primitive_restart(ctx, prim, primcount, &ib,
- GL_FALSE, ~0, ~0);
+ vbo->draw_prims(ctx, prim, primcount, &ib,
+ false, ~0, ~0, NULL, NULL);
} else {
/* render one prim at a time */
for (i = 0; i < primcount; i++) {
@@ -1401,8 +1369,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
prim[0].basevertex = 0;
check_buffers_are_unmapped(exec->array.inputs);
- vbo_handle_primitive_restart(ctx, prim, 1, &ib,
- GL_FALSE, ~0, ~0);
+ vbo->draw_prims(ctx, prim, 1, &ib,
+ false, ~0, ~0, NULL, NULL);
}
}
@@ -1464,8 +1432,6 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
if (ctx->Driver.GetTransformFeedbackVertexCount &&
(ctx->Const.AlwaysUseGetTransformFeedbackVertexCount ||
- (ctx->Const.PrimitiveRestartInSoftware &&
- ctx->Array._PrimitiveRestart) ||
!vbo_all_varyings_in_vbos(exec->array.inputs))) {
GLsizei n = ctx->Driver.GetTransformFeedbackVertexCount(ctx, obj, stream);
vbo_draw_arrays(ctx, mode, 0, n, numInstances, 0);