mesa: Generate an error when glCopyTexImage border is invalid

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>
This commit is contained in:
Ian Romanick 2012-07-26 18:43:26 -07:00
parent 2dcb40bb44
commit 59d965333c
1 changed files with 2 additions and 0 deletions

View 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;
}