patches: Select texture target based on pixel format

Based on:

http://review.androidarmv6.org/#/c/5612/

http://review.androidarmv6.org/#/c/6665/