buffer: use a 2d instead of 1d mapping for tile locks