In a civil proceeding, on a trial court's granting or denial, in whole or in part, of a motion to dismiss filed under the rules adopted by the supreme court under Section 22.004(g), Government Code, the court may award costs and reasonable and necessary attorney's fees to the prevailing party. This section does not apply to actions by or against the state, other governmental entities, or public officials acting in their official capacity or under color of law.
Tex. Civ. Prac. and Rem. Code § 30.021