Mesa (master): mesa: Don' t allow GL_TEXTURE_BORDER queries outside compat profile

Ian Romanick idr at kemper.freedesktop.org
Tue Jul 15 17:54:57 UTC 2014


Module: Mesa
Branch: master
Commit: 750286600b871ee5506e2589719f58bda215a605
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=750286600b871ee5506e2589719f58bda215a605

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jun 16 17:17:43 2014 -0700

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 at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Cc: "10.2 <mesa-stable at lists.freedesktop.org>

---

 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:




More information about the mesa-commit mailing list