From: Brian Paul Date: Mon, 7 Jul 2003 17:01:18 +0000 (+0000) Subject: fix conformance glitch introduced with NPOT extension X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6e76fe9b5c4c57ac6dc81143b4474ebfee879d2;p=mesa.git fix conformance glitch introduced with NPOT extension --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d731e12ad3b..de28839463a 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1015,6 +1015,14 @@ texture_error_check( GLcontext *ctx, GLenum target, return GL_TRUE; } + if (width < 1 || height < 1 || depth < 1) { + if (!isProxy) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glTexImage%dD(width, height or depth < 1)", dimensions); + } + return GL_TRUE; + } + /* Check target and call ctx->Driver.TestProxyTexImage() to check the * level, width, height and depth. */