Add stencil write mask support