From cf293e518ebd847cb28e03d4378679c47548206d Mon Sep 17 00:00:00 2001 From: Marta Lofstedt Date: Wed, 19 Aug 2015 20:25:23 +0200 Subject: [PATCH] mesa/es3.1: Allow query of Vertex bindings for GLES 3.1 Signed-off-by: Marta Lofstedt --- src/mesa/main/get.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index d5df53057d7..926caef7031 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1969,7 +1969,8 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) return TYPE_INT64; case GL_VERTEX_BINDING_DIVISOR: - if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_instanced_arrays) + if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_instanced_arrays) && + !_mesa_is_gles31(ctx)) goto invalid_enum; if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) goto invalid_value; @@ -1977,7 +1978,7 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) return TYPE_INT; case GL_VERTEX_BINDING_OFFSET: - if (!_mesa_is_desktop_gl(ctx)) + if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles31(ctx)) goto invalid_enum; if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) goto invalid_value; @@ -1985,7 +1986,7 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) return TYPE_INT; case GL_VERTEX_BINDING_STRIDE: - if (!_mesa_is_desktop_gl(ctx)) + if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles31(ctx)) goto invalid_enum; if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) goto invalid_value; -- 2.30.2