Module: Mesa Branch: 10.4 Commit: 8c77be7ef9b1a53167f9f4427d205623dcaaa830 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c77be7ef9b1a53167f9f4427d205623dcaaa830
Author: Marek Olšák <marek.ol...@amd.com> Date: Sun Jan 4 14:27:33 2015 +0100 vbo: ignore primitive restart if FixedIndex is enabled in DrawArrays From GL 4.4 Core profile: If both PRIMITIVE_RESTART and PRIMITIVE_RESTART_FIXED_INDEX are enabled, the index value determined by PRIMITIVE_RESTART_FIXED_INDEX is used. If PRIMITIVE_RESTART_FIXED_INDEX is enabled, primitive restart is not performed for array elements transferred by any drawing command not taking a type parameter, including all of the *Draw* commands other than *DrawEle- ments*. Cc: 10.2 10.3 10.4 <mesa-sta...@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> (cherry picked from commit 8f5d3095211eee609dfd52eee9f64ce8492b956b) --- src/mesa/vbo/vbo_exec_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index e623b36..011b2d1 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -596,7 +596,8 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, prim[0].is_indirect = 0; /* Implement the primitive restart index */ - if (ctx->Array.PrimitiveRestart && ctx->Array.RestartIndex < count) { + if (ctx->Array.PrimitiveRestart && !ctx->Array.PrimitiveRestartFixedIndex && + ctx->Array.RestartIndex < count) { GLuint primCount = 0; if (ctx->Array.RestartIndex == start) { _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit