diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-07-03 03:05:48 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-07-03 03:05:48 +0000 |
commit | 887e2cf01a99f7fe1b7c94320b7bdbbf0d6ad2f8 (patch) | |
tree | 0db71a71d77fc7130d080e2435cddf22f7f8fea3 /src/mesa/drivers/x11/xm_dd.c | |
parent | 32bac60519dab482cd3f44355563750a4521f4cb (diff) |
Implemented GL_ARB_texture_non_power_of_two (except for auto mipmap generation).
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; } |