[Mesa-dev] [PATCH 06/14] mesa: add KHR_no_error support for glEnableVertexA*A*()
Timothy Arceri
tarceri at itsqueeze.com
Wed Jun 28 06:13:44 UTC 2017
---
src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +-
src/mapi/glapi/gen/gl_API.xml | 2 +-
src/mesa/main/varray.c | 18 ++++++++++++++++++
src/mesa/main/varray.h | 7 +++++++
4 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index c9031c1..31f8af1 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -589,7 +589,7 @@
<param name="index" type="GLuint" />
</function>
- <function name="EnableVertexArrayAttrib">
+ <function name="EnableVertexArrayAttrib" no_error="true">
<param name="vaobj" type="GLuint" />
<param name="index" type="GLuint" />
</function>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 9482ab5..1d3dd41 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5346,7 +5346,7 @@
<glx handcode="true"/>
</function>
- <function name="EnableVertexAttribArray" es2="2.0">
+ <function name="EnableVertexAttribArray" es2="2.0" no_error="true">
<param name="index" type="GLuint"/>
<glx ignore="true"/>
<glx handcode="true"/>
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index a02dbb2..7665e77 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1100,6 +1100,15 @@ _mesa_EnableVertexAttribArray(GLuint index)
void GLAPIENTRY
+_mesa_EnableVertexAttribArray_no_error(GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_enable_vertex_array_attrib(ctx, ctx->Array.VAO,
+ VERT_ATTRIB_GENERIC(index));
+}
+
+
+void GLAPIENTRY
_mesa_EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1120,6 +1129,15 @@ _mesa_EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
}
+void GLAPIENTRY
+_mesa_EnableVertexArrayAttrib_no_error(GLuint vaobj, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_vertex_array_object *vao = _mesa_lookup_vao(ctx, vaobj);
+ _mesa_enable_vertex_array_attrib(ctx, vao, VERT_ATTRIB_GENERIC(index));
+}
+
+
static void
disable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index 8525fcc..c2fae76 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -223,10 +223,17 @@ _mesa_VertexAttribLPointer(GLuint index, GLint size, GLenum type,
extern void GLAPIENTRY
_mesa_EnableVertexAttribArray(GLuint index);
+extern void GLAPIENTRY
+_mesa_EnableVertexAttribArray_no_error(GLuint index);
+
extern void GLAPIENTRY
_mesa_EnableVertexArrayAttrib(GLuint vaobj, GLuint index);
+extern void GLAPIENTRY
+_mesa_EnableVertexArrayAttrib_no_error(GLuint vaobj, GLuint index);
+
+
extern void GLAPIENTRY
_mesa_DisableVertexAttribArray(GLuint index);
--
2.9.4
More information about the mesa-dev
mailing list