From 887e2cf01a99f7fe1b7c94320b7bdbbf0d6ad2f8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Jul 2003 03:05:48 +0000 Subject: Implemented GL_ARB_texture_non_power_of_two (except for auto mipmap generation). --- src/mesa/drivers/x11/xm_dd.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 30a8b51723..3a3375f34c 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -937,9 +937,15 @@ test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, if (target == GL_PROXY_TEXTURE_3D) { /* special case for 3D textures */ if (width * height * depth > 512 * 512 * 64 || - width < 2 * border || _mesa_bitcount(width - 2 * border) != 1 || - height < 2 * border || _mesa_bitcount(height - 2 * border) != 1 || - depth < 2 * border || _mesa_bitcount(depth - 2 * border) != 1) { + width < 2 * border || + (!ctx->Extensions.ARB_texture_non_power_of_two && + _mesa_bitcount(width - 2 * border) != 1) || + height < 2 * border || + (!ctx->Extensions.ARB_texture_non_power_of_two && + _mesa_bitcount(height - 2 * border) != 1) || + depth < 2 * border || + (!ctx->Extensions.ARB_texture_non_power_of_two && + _mesa_bitcount(depth - 2 * border) != 1)) { /* Bad size, or too many texels */ return GL_FALSE; } -- cgit v1.2.3