mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
mesa: add primitive_restart_index() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
bc1c45d0ed
commit
de4e5b4dac
1 changed files with 11 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue