summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2013-04-04 22:15:13 +0200
committerFredrik Höglund <[email protected]>2013-11-07 16:20:45 +0100
commitfb370f89dbebe4be989d994719449507d523f2c6 (patch)
tree2d669a9bf6764a49ab49933b5820d975a5563c3b /src/mesa/main/varray.c
parent59b01ca252bd6706f08cd80a864819d71dfe741c (diff)
mesa: Add Get* support for ARB_vertex_attrib_binding
Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index b0e02865b1d..39e5ad30ab8 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -747,6 +747,16 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
return arrayObj->VertexBinding[array->VertexBinding].InstanceDivisor;
}
goto error;
+ case GL_VERTEX_ATTRIB_BINDING:
+ if (_mesa_is_desktop_gl(ctx)) {
+ return array->VertexBinding - VERT_ATTRIB_GENERIC0;
+ }
+ goto error;
+ case GL_VERTEX_ATTRIB_RELATIVE_OFFSET:
+ if (_mesa_is_desktop_gl(ctx)) {
+ return array->RelativeOffset;
+ }
+ goto error;
default:
; /* fall-through */
}