diff options
author | Marta Lofstedt <[email protected]> | 2015-08-31 15:04:18 +0200 |
---|---|---|
committer | Marta Lofstedt <[email protected]> | 2015-09-09 09:29:04 +0200 |
commit | b8d6de87f6e2d5fc621db573b9ce579b1a27ee56 (patch) | |
tree | 63a56eb221189df7ab851a8f838d9f51da16d582 | |
parent | ea69ae04dba501016e9faf5f71095908f011d29d (diff) |
mesa: Allow query of GL_VERTEX_BINDING_BUFFER
According to OpenGL ES 3.1 specification table : 20.2 and
OpenGL specification 4.4 table 23.4. The glGetIntegeri_v
functions should report the name of the buffer bound
when called with GL_VERTEX_BINDING_BUFFER.
Signed-off-by: Marta Lofstedt <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
-rw-r--r-- | src/mesa/main/get.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 4855187aa6f..d5df53057d7 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1992,6 +1992,14 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) v->value_int = ctx->Array.VAO->VertexBinding[VERT_ATTRIB_GENERIC(index)].Stride; return TYPE_INT; + case GL_VERTEX_BINDING_BUFFER: + if (ctx->API == API_OPENGLES2 && ctx->Version < 31) + goto invalid_enum; + if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) + goto invalid_value; + v->value_int = ctx->Array.VAO->VertexBinding[VERT_ATTRIB_GENERIC(index)].BufferObj->Name; + return TYPE_INT; + /* ARB_shader_image_load_store */ case GL_IMAGE_BINDING_NAME: { struct gl_texture_object *t; |