If a surrender of the accused be made during a term of the court to which he has bound himself to appear, the sheriff shall take him before the court; and if he is willing to give other bail, the court shall forthwith require him to do so. If he fails or refuses to give bail, the court shall make an order that he be committed to jail until the bail is given, and this shall be a sufficient commitment without any written order to the sheriff.
Tex. Code Crim. Proc. § 17.17