Sec. 1. (a) Subsection (b) applies to a proceeding in the prosecution of a defendant for an offense, or an attempt or conspiracy to commit an offense, under the following provisions of the Penal Code:
(1) if committed against a child under 17 years of age:
(A) Chapter 21 (Sexual Offenses);
(B) Chapter 22 (Assaultive Offenses); or
(C) Section 25.02 (Prohibited Sexual Conduct); or
(2) if committed against a person younger than 18 years of age:
(A) Section 43.25 (Sexual Performance by a Child);
(B) Section 20A.02(a)(7) or (8); or
(C) Section 43.05(a)(2) (Compelling Prostitution).
(b) Notwithstanding Rules 404 and 405, Texas Rules of Evidence, evidence of other crimes, wrongs, or acts committed by the defendant against the child who is the victim of the alleged offense shall be admitted for its bearing on relevant matters, including:
(1) the state of mind of the defendant and the child; and
(2) the previous and subsequent relationship between the defendant and the child.