From 750286600b871ee5506e2589719f58bda215a605 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 16 Jun 2014 17:17:43 -0700 Subject: [PATCH] mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile There are no texture borders in any version of OpenGL ES or desktop OpenGL core profile. Fixes piglit's gl-3.2-texture-border-deprecated. v2: Rebase on different initial change. Signed-off-by: Ian Romanick Reviewed-by: Brian Paul Cc: "10.2 --- src/mesa/main/texparam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 6767f32..6bf116a 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1108,6 +1108,8 @@ get_tex_level_parameter_image(struct gl_context *ctx, } break; case GL_TEXTURE_BORDER: + if (ctx->API != API_OPENGL_COMPAT) + goto invalid_pname; *params = img->Border; break; case GL_TEXTURE_RED_SIZE: -- 2.7.4