Set depth update flag when depth write is enabled in non-clear mode only

Try to set depth update flag only either depth write is enabled or the hack depth write enabled instead of only depth test enabled.

Probably less copy and better performance .

Fixes https://github.com/hrydgard/ppsspp/issues/5068