mesa/teximage: report the correct function which triggered the error