The magistrate may issue an attachment for a witness to any county in the State, when affidavit is made by the party applying therefor that the testimony of the witness is material to the prosecution, or the defense, as the case may be; and the affidavit shall further state the facts which it is expected will be proved by the witness; and if the facts set forth are not considered material by the magistrate, or if they be admitted to be true by the adverse party, the attachment shall not issue.
Tex. Code Crim. Proc. § 16.11