summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-10-25 16:11:21 +0200
committerPierre-Eric Pelloux-Prayer <[email protected]>2019-11-05 13:58:28 +0100
commit5adeff80339e00b8cfe3d8df4d403fb48c569aa3 (patch)
tree69d5e3bb4b35060eea0b473d87efaa92c052a205 /src/mesa/main/varray.c
parentf793a8663df1a84230e1041447eacec9db4c0fde (diff)
mesa: add EXT_dsa EnableVertexArrayAttribEXT / DisableVertexArrayAttribEXT
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 1696e7e953e..4b197dba826 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1612,6 +1612,19 @@ _mesa_EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
enable_vertex_array_attrib(ctx, vao, index, "glEnableVertexArrayAttrib");
}
+void GLAPIENTRY
+_mesa_EnableVertexArrayAttribEXT(GLuint vaobj, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_vertex_array_object* vao = _mesa_lookup_vao_err(ctx, vaobj,
+ true,
+ "glEnableVertexArrayAttribEXT");
+ if (!vao)
+ return;
+
+ enable_vertex_array_attrib(ctx, vao, index, "glEnableVertexArrayAttribEXT");
+}
+
void GLAPIENTRY
_mesa_EnableVertexArrayAttrib_no_error(GLuint vaobj, GLuint index)
@@ -1694,6 +1707,25 @@ _mesa_DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
_mesa_disable_vertex_array_attrib(ctx, vao, attrib);
}
+void GLAPIENTRY
+_mesa_DisableVertexArrayAttribEXT(GLuint vaobj, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_vertex_array_object* vao = _mesa_lookup_vao_err(ctx, vaobj,
+ true,
+ "glEnableVertexArrayAttribEXT");
+ if (!vao)
+ return;
+
+ if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDisableVertexArrayAttrib(index)");
+ return;
+ }
+
+ const gl_vert_attrib attrib = VERT_ATTRIB_GENERIC(index);
+ _mesa_disable_vertex_array_attrib(ctx, vao, attrib);
+}
+
void GLAPIENTRY
_mesa_DisableVertexArrayAttrib_no_error(GLuint vaobj, GLuint index)