diff options
Diffstat (limited to 'src/mesa/drivers')
-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; } |