When is DUI a felony in Texas?

In Texas, a DUI becomes a felony upon the third offense. Up until that point, a regular DUI is a misdemeanor.