implement the backend funtion for hal_tbm_surface.