Merge "Pre-compute and use contiguous wedge masks." into nextgenv2