Can stencil textures be used in a compute kernel

Is it possible to initialize the content of a stencil texture within a compute kernel function? In my case I wanted to fill zeros in the even rows and ones in the odd rows of the stencil buffer. When I use .stencil8 as a pixel format for this texture, then Xcode gives me an error that this pixel format .stencil8 has no write access for a compute function even the usage property in the texture descriptor contains the .shaderWrite flag.