A person may be compelled to give testimony or produce evidence when legally called upon to do so at any Court of Inquiry; however, if any person refuses or declines to testify or produce evidence on the ground that it may incriminate him under laws of this state, then the judge may, in his discretion, compel such person to testify or produce evidence but the person shall not be prosecuted or subjected to any penalty or forfeiture for, or on account of, any transaction, matter or thing concerning which he may be compelled to testify or produce evidence at such Court of Inquiry.
Tex. Code Crim. Proc. § 52.05