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 <marta.lofstedt@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
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;