diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-19 09:39:42 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:39 +0200 |
commit | de4e5b4dac51a1b667ce2fe8218d3969b88252bc (patch) | |
tree | 12bd4a07b50589ea164c16518a0db70564779708 /src/mesa | |
parent | bc1c45d0ed56b5b52c965bba928d07b3290a2588 (diff) |
mesa: add primitive_restart_index() helper
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/varray.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index db9261f1058..6aa4c72bdd1 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1923,6 +1923,16 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, } +static void +primitive_restart_index(struct gl_context *ctx, GLuint index) +{ + if (ctx->Array.RestartIndex != index) { + FLUSH_VERTICES(ctx, 0); + ctx->Array.RestartIndex = index; + } +} + + /** * GL_NV_primitive_restart and GL 3.1 */ @@ -1936,10 +1946,7 @@ _mesa_PrimitiveRestartIndex(GLuint index) return; } - if (ctx->Array.RestartIndex != index) { - FLUSH_VERTICES(ctx, 0); - ctx->Array.RestartIndex = index; - } + primitive_restart_index(ctx, index); } |