Some tasks have support for taking in a mask. During processing the mask will be read and if it is all 0, the block will be skipped. This is difficult to maintain and optimized since it is done on an individual task basis.
Some approaches to consider: