When a witness who resides in the county of the prosecution has been duly served with a subpoena to appear and testify in any criminal action or proceeding fails to so appear, the attorney representing the state or the defendant may request that the court issue an attachment for the witness. The request must be filed with the clerk of the court and must include an affidavit of the attorney representing the state or the defendant, as applicable, stating that the affiant has good reason to believe, and does believe, that the witness is a material witness.
Tex. Code Crim. Proc. § 24.12