diff options
author | Kenneth Graunke <[email protected]> | 2013-05-29 08:21:14 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-05-29 14:22:04 -0700 |
commit | 1569709663f5ad3c339494f756bcc05f37044182 (patch) | |
tree | 31d5175f5ef95532bbb145c322d98d2c25553577 /src/mesa/vbo/vbo_primitive_restart.c | |
parent | 959d076b30fce8aa9f09c68e5fe885e98c55aaa5 (diff) |
vbo: Use the new primitive restart index helper function.
This gets the correct restart index for unsigned byte/short types when
using GL_PRIMITIVE_RESTART_FIXED_INDEX.
NOTE: This is a candidate for the 9.1 branch.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_primitive_restart.c')
-rw-r--r-- | src/mesa/vbo/vbo_primitive_restart.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c index a6a0149ca63..418f8829d9b 100644 --- a/src/mesa/vbo/vbo_primitive_restart.c +++ b/src/mesa/vbo/vbo_primitive_restart.c @@ -31,6 +31,7 @@ #include "main/imports.h" #include "main/bufferobj.h" #include "main/macros.h" +#include "main/varray.h" #include "vbo.h" #include "vbo_context.h" @@ -171,7 +172,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx, GLuint sub_prim_num; GLuint end_index; GLuint sub_end_index; - GLuint restart_index = ctx->Array._RestartIndex; + GLuint restart_index = _mesa_primitive_restart_index(ctx, ib->type); struct _mesa_prim temp_prim; struct vbo_context *vbo = vbo_context(ctx); vbo_draw_func draw_prims_func = vbo->draw_prims; |