summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-05-29 08:07:01 -0700
committerKenneth Graunke <[email protected]>2013-05-29 14:22:02 -0700
commit959d076b30fce8aa9f09c68e5fe885e98c55aaa5 (patch)
treeb473f96213c53305648bc2b157f3b673bc61366a /src/mesa/main/varray.h
parent37f278000c7a1a6d15eeeed4e52cdea3063c0a0f (diff)
mesa: Add a helper function for determining the restart index.
The derived state approach currently used (_RestartIndex) doesn't work: in the GL_PRIMITIVE_RESTART_FIXED_INDEX case, the restart index depends on the index buffer's data type, and that isn't known until draw time. The existing code also fails to obey the GL 4.3 rules which say that FIXED_INDEX takes precedence over normal primitive restart. This helper function correctly determines the restart index, and will replace the derived state. 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/main/varray.h')
-rw-r--r--src/mesa/main/varray.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index b3d5a6a9faa..a178bc13c9e 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -248,6 +248,8 @@ _mesa_PrimitiveRestartIndex(GLuint index);
extern void GLAPIENTRY
_mesa_VertexAttribDivisor(GLuint index, GLuint divisor);
+extern unsigned
+_mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type);
extern void
_mesa_copy_client_array(struct gl_context *ctx,