diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-11-05 15:04:52 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-11-19 08:49:44 +0100 |
commit | 442fd3d007d733a24e8d2473756467d616a134ac (patch) | |
tree | 95cf9b4efa7b3465596fe0147885d2c7dca0048f /src/mesa/main | |
parent | 8cfb3e4ee57070ff45e7534a986a20c5fd649dc7 (diff) |
mesa: add ARB_vertex_attrib_64bit VertexArrayVertexAttribLOffsetEXT
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 1 | ||||
-rw-r--r-- | src/mesa/main/varray.c | 34 | ||||
-rw-r--r-- | src/mesa/main/varray.h | 4 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 390e3ef381f..6df90e966f1 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -616,6 +616,7 @@ const struct function common_desktop_functions_possible[] = { { "glVertexAttribL4dv", 41, -1 }, { "glVertexAttribLPointer", 41, -1 }, { "glGetVertexAttribLdv", 41, -1 }, + { "glVertexArrayVertexAttribLOffsetEXT", 41, -1 }, /* GL 4.3 */ { "glIsRenderbuffer", 43, -1 }, diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 17d5288b6f2..8db6f13a319 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1411,6 +1411,40 @@ _mesa_VertexArrayVertexAttribOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index void GLAPIENTRY +_mesa_VertexArrayVertexAttribLOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, + GLenum type, GLsizei stride, GLintptr offset) +{ + GET_CURRENT_CONTEXT(ctx); + GLenum format = GL_RGBA; + struct gl_vertex_array_object* vao; + struct gl_buffer_object* vbo; + + if (!_lookup_vao_and_vbo_dsa(ctx, vaobj, buffer, offset, + &vao, &vbo, + "glVertexArrayVertexAttribLOffsetEXT")) + return; + + if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) { + _mesa_error(ctx, GL_INVALID_VALUE, "glVertexArrayVertexAttribLOffsetEXT(idx)"); + return; + } + + const GLbitfield legalTypes = DOUBLE_BIT; + + if (!validate_array_and_format(ctx, "glVertexArrayVertexAttribLOffsetEXT", + vao, vbo, + VERT_ATTRIB_GENERIC(index), legalTypes, + 1, 4, size, type, stride, + GL_FALSE, GL_FALSE, GL_TRUE, format, (void*) offset)) + return; + + update_array(ctx, vao, vbo, + VERT_ATTRIB_GENERIC(index), format, 4, + size, type, stride, GL_FALSE, GL_FALSE, GL_TRUE, (void*) offset); +} + + +void GLAPIENTRY _mesa_VertexAttribIPointer_no_error(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) { diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index ecb463f42d3..fb490f1a586 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -495,6 +495,10 @@ _mesa_VertexArrayVertexAttribIOffsetEXT(GLuint vaobj, GLuint buffer, GLuint inde GLenum type, GLsizei stride, GLintptr offset); extern void GLAPIENTRY +_mesa_VertexArrayVertexAttribLOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, + GLenum type, GLsizei stride, GLintptr offset); + +extern void GLAPIENTRY _mesa_GetVertexArrayIntegervEXT(GLuint vaobj, GLenum pname, GLint *param); extern void GLAPIENTRY |