When a jury has been impaneled to assess the punishment upon a plea of guilty, it shall say in its verdict what the punishment is which it assesses; but if it is of the opinion that a person pleading guilty is insane, it shall so report to the court, and an issue as to that fact shall be tried before another jury; and if, upon such trial, it be found that the defendant is insane, such proceedings shall be had as directed in cases where a defendant becomes insane after conviction.
Tex. Code Crim. Proc. § 37.13