The conduct of peace officers, in preventing offenses about to be committed in their presence, or within their view, is to be regulated by the same rules as are prescribed to the action of the person about to be injured. They may use all force necessary to repel the aggression.
Tex. Code Crim. Proc. § 6.07