mesa: Generate an error when glCopyTexImage border is invalid
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 27 Jul 2012 01:43:26 +0000 (18:43 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Aug 2012 17:15:30 +0000 (10:15 -0700)
NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/teximage.c

index 8efa179724aedb683d9dbebfa771c863f9fa7a56..879a24e88aa79a7d70b729acd059f9dc34ffcfe9 100644 (file)
@@ -2009,6 +2009,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
    if (border < 0 || border > 1 ||
        ((target == GL_TEXTURE_RECTANGLE_NV ||
          target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) {
+      _mesa_error(ctx, GL_INVALID_VALUE,
+                  "glCopyTexImage%dD(border=%d)", dimensions, border);
       return GL_TRUE;
    }