mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 17 Jun 2014 00:17:43 +0000 (17:17 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Jul 2014 17:46:33 +0000 (10:46 -0700)
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>
src/mesa/main/texparam.c

index 6767f32086007697c6a22acb6e0e3adf398b1e58..6bf116abafe660df5d02c18f1a0e37e7da5b1321 100644 (file)
@@ -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: