From f6e76fe9b5c4c57ac6dc81143b4474ebfee879d2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 7 Jul 2003 17:01:18 +0000 Subject: fix conformance glitch introduced with NPOT extension --- src/mesa/main/teximage.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d731e12ad3..de28839463 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. */ -- cgit v1.2.3