Two or more defendants who are jointly or separately indicted or complained against for the same offense or any offense growing out of the same transaction may be, in the discretion of the court, tried jointly or separately as to one or more defendants; provided that in any event either defendant may testify for the other or on behalf of the state; and provided further, that in cases in which, upon timely motion to sever, and evidence introduced thereon, it is made known to the court that there is a previous admissible conviction against one defendant or that a joint trial would be prejudicial to any defendant, the court shall order a severance as to the defendant whose joint trial would prejudice the other defendant or defendants.
Tex. Code Crim. Proc. § 36.09