[util] Add error arguments to texture functions