How do 8 layers get mapped to 12 PDSCH antenna ports?

In 5G NR for PDSCH PHY processing, the scrambled bits after the modulation mapper go through a layer mapping operation followed by antenna port mapping, as shown below.

Where the maximum number of layers $(N_{\nu})$ that can be assigned is equal to $N_{\nu, \mathrm{max}} = 8$ and the maximum number of antenna ports $(N_{p})$ for PDSCH is equal to $N_{p, \mathrm{max}} = 12$ with $p = {1000, 1001, \cdots, 1011}$.

The antenna port mapping operation is defined in $138.211$ as
image

How do 8 layers get mapped to 12 antenna ports?