mesa: create wrapper around teximage()