From: Ian Romanick Date: Tue, 17 Jun 2014 00:17:43 +0000 (-0700) Subject: mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=750286600b871ee5506e2589719f58bda215a605;p=mesa.git 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 --- diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 6767f320860..6bf116abafe 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: