if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
- if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ if (height > 0 && !util_is_power_of_two_nonzero(height - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (depth < 2 * border || depth > 2 * border + maxSize)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
- if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ if (height > 0 && !util_is_power_of_two_nonzero(height - 2 * border))
return GL_FALSE;
- if (depth > 0 && !_mesa_is_pow_two(depth - 2 * border))
+ if (depth > 0 && !util_is_power_of_two_nonzero(depth - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
- if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ if (height > 0 && !util_is_power_of_two_nonzero(height - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (height < 0 || height > ctx->Const.MaxArrayTextureLayers)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (depth < 0 || depth > ctx->Const.MaxArrayTextureLayers)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
- if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ if (height > 0 && !util_is_power_of_two_nonzero(height - 2 * border))
return GL_FALSE;
}
return GL_TRUE;
if (level >= ctx->Const.MaxCubeTextureLevels)
return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
- if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ if (width > 0 && !util_is_power_of_two_nonzero(width - 2 * border))
return GL_FALSE;
- if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ if (height > 0 && !util_is_power_of_two_nonzero(height - 2 * border))
return GL_FALSE;
}
return GL_TRUE;