Texas constitution
Article 5: judicial department
Section 5

(c) Subject to such regulations as may be prescribed by law, the Court of Criminal Appeals and the Judges thereof shall have the power to issue the writ of habeas corpus, and, in criminal law matters, the writs of mandamus, procedendo, prohibition, and certiorari. The Court and the Judges thereof shall have the power to issue such other writs as may be necessary to protect its jurisdiction or enforce its judgments. The court shall have the power upon affidavit or otherwise to ascertain such matters of fact as may be necessary to the exercise of its jurisdiction.