The relevant statute is Texas Penal Code § 30.05, which makes it an offense to enter or remain on property without the effective consent of the owner and when the person had notice either to leave or that their entering the property was forbidden. This second part is normally called a criminal trespass warning, and officers generally give it on behalf of a property owner so that it is documented, but any owner can give one, or any person who has the ability to consent to a person's being on the property.