I'm trying to implement depth peeling onto a 2D texture array, where each array slice corresponds to a depth layer. In order to do this, I'd like to draw to subsequent array slices of this texture, while using the previous slice for depth testing.
This seems impossible without copying subresources in between each draw, which I'd like to not do. I found this question, where the answer suggests using the MipSlice
parameter to access the array slice. This seems like a mistake, as the subresources guide states clearly that mip slices select the miplevel for each array slice. I'd guess that in the case of mismatching texture types, like using a single array slice as its own resource, this would select the miplevel of that array slice. But it doesn't make sense to use the mip slice to access the entire resource as if by subresource index.
Even if you can do this, would the API know how far to increment the pointer into the GPU resource? Shouldn't incrementing the mip slice be telling the API to increment the pointer by less, to account for the smaller size (each mipslice has dimensions half that of the previous)?