layer buf created when needed