A district judge, county court at law judge, or justice of the peace may refer to a judge of the criminal law magistrate court any criminal case or matter relating to a criminal case for any proceeding other than presiding over a criminal trial on the merits, whether or not the trial is before a jury.
Tex. Gov't. Code § 54.2506