ABSTRACTWe use our cluster population model, cBHBd, to explore the mass distribution of merging black hole binaries formed dynamically in globular clusters. We include in our models the effect of mass growth through hierarchical mergers and compare the resulting distributions to those inferred from the third gravitational wave transient catalogue. We find that none of our models can reproduce the peak at m1 ≃ 10 M⊙ in the primary black hole mass distribution that is inferred from the data. This disfavours a scenario where most of the sources are formed in globular clusters. On the other hand, a globular cluster origin can account for the inferred secondary peak at m1 ≃ 35 M⊙, which requires that the most massive clusters form with half-mass densities $\rho _{\rm h,0}\gtrsim 10^4~{\rm M}_{\odot} \, {\rm pc}^{-3}$. Finally, we find that the lack of a high-mass cut-off in the inferred mass distribution can be explained by the repopulation of an initial mass gap through hierarchical mergers. Matching the inferred merger rate above ≃50 M⊙ requires both initial cluster densities $\rho _{\rm h,0}\gtrsim 10^4~{\rm M}_{\odot} \, {\rm pc}^{-3}$, and that black holes form with nearly zero spin. A hierarchical merger scenario makes specific predictions for the appearance and position of multiple peaks in the black hole mass distribution, which can be tested against future data.