summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-06-16 17:17:43 -0700
committerIan Romanick <ian.d.romanick@intel.com>2014-07-15 10:46:33 -0700
commit750286600b871ee5506e2589719f58bda215a605 (patch)
tree825c548d31e1e61c66e30fba4d1584c5ddf2cd06 /src/mesa/main/texparam.c
parentee58c71a65bb5b769a03e4b25bd13c57a6b742d8 (diff)
downloadexternal_mesa3d-750286600b871ee5506e2589719f58bda215a605.zip
external_mesa3d-750286600b871ee5506e2589719f58bda215a605.tar.gz
external_mesa3d-750286600b871ee5506e2589719f58bda215a605.tar.bz2
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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "10.2 <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r--src/mesa/main/texparam.c2
1 files changed, 2 insertions, 0 deletions
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: