summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-07-19 09:40:49 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-07-31 13:53:39 +0200
commit6f6c5a1ad7c952d6411d0a327b6f83f67d7388b0 (patch)
treec797e27a0f05b5c3e02be6035fbf0275fc4038be
parentde4e5b4dac51a1b667ce2fe8218d3969b88252bc (diff)
mesa: add KHR_no_error support to glPrimitiveRestartIndex()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mapi/glapi/gen/GL3x.xml2
-rw-r--r--src/mesa/main/varray.c8
-rw-r--r--src/mesa/main/varray.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml
index 7c86e8fc51..e55b5bbe65 100644
--- a/src/mapi/glapi/gen/GL3x.xml
+++ b/src/mapi/glapi/gen/GL3x.xml
@@ -563,7 +563,7 @@
<param name="buffer" type="GLuint"/>
</function>
- <function name="PrimitiveRestartIndex">
+ <function name="PrimitiveRestartIndex" no_error="true">
<param name="index" type="GLuint"/>
</function>
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 6aa4c72bdd..9934724489 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1937,6 +1937,14 @@ primitive_restart_index(struct gl_context *ctx, GLuint index)
* GL_NV_primitive_restart and GL 3.1
*/
void GLAPIENTRY
+_mesa_PrimitiveRestartIndex_no_error(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ primitive_restart_index(ctx, index);
+}
+
+
+void GLAPIENTRY
_mesa_PrimitiveRestartIndex(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index 182fb544f6..730f7cf358 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -351,6 +351,9 @@ _mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
extern void GLAPIENTRY
_mesa_DrawTransformFeedback(GLenum mode, GLuint name);
+void GLAPIENTRY
+_mesa_PrimitiveRestartIndex_no_error(GLuint index);
+
extern void GLAPIENTRY
_mesa_PrimitiveRestartIndex(GLuint index);