diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-03 22:03:10 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-14 10:04:35 +0200 |
commit | afb141156f09e7f2f22b88eeefe8e0800c26c1d6 (patch) | |
tree | 5fbfd946c4ee5dcd3e29cde519e1986848680fc3 /src/mesa/main/varray.c | |
parent | 1fe7b1f9724ac38cbddcac6505d3750ef99a2eca (diff) |
mesa: add support for unsigned 64-bit vertex attributes
This adds support in the VBO and array code to handle unsigned
64-bit vertex attributes as specified by ARB_bindless_texture.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index aa9bb472c63..0d767ad7fcf 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1356,6 +1356,24 @@ _mesa_GetVertexAttribiv(GLuint index, GLenum pname, GLint *params) void GLAPIENTRY _mesa_GetVertexAttribLui64vARB(GLuint index, GLenum pname, GLuint64EXT *params) { + GET_CURRENT_CONTEXT(ctx); + + if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { + const GLuint64 *v = + (const GLuint64 *)get_current_attrib(ctx, index, + "glGetVertexAttribLui64vARB"); + if (v != NULL) { + params[0] = v[0]; + params[1] = v[1]; + params[2] = v[2]; + params[3] = v[3]; + } + } + else { + params[0] = (GLuint64) get_vertex_array_attrib(ctx, ctx->Array.VAO, + index, pname, + "glGetVertexAttribLui64vARB"); + } } |