Computer turning off is a good sign your PSU is starting to fail.

A good benchmark for it is if it happens more with graphically intense games, it means the PSU can no longer support the required power the videocard is demanding. Eventually it will start turning off even on your desktop and idleing.