[Mesa-stable] [PATCH 2/3] mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profile
Ian Romanick
idr at freedesktop.org
Mon Jun 16 18:34:12 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
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.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "10.2 <mesa-stable at lists.freedesktop.org>
---
src/mesa/main/texparam.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 565c1d6..f67745b 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1061,7 +1061,11 @@ get_tex_level_parameter_image(struct gl_context *ctx,
case GL_TEXTURE_HEIGHT:
case GL_TEXTURE_DEPTH:
case GL_TEXTURE_INTERNAL_FORMAT:
+ break;
case GL_TEXTURE_BORDER:
+ if (ctx->API != API_OPENGL_COMPAT)
+ goto invalid_pname;
+ break;
case GL_TEXTURE_RED_SIZE:
case GL_TEXTURE_GREEN_SIZE:
case GL_TEXTURE_BLUE_SIZE:
--
1.8.1.4
More information about the mesa-stable
mailing list