I'm doing some work on volume modeling using Direct3D 10. I want to be able to render to a 3D texture with one of the wslices as the render target and using a depth/stencil surface. I tried calling OMSetRenderTargets with a render view for one of the wslices and a depth/stencil view set to a 2D texture. The 2D texture has the same dimensions as the 3D texture and since the view of the 3D texture is only a slice, this pair should technically be feasible to use together.
When I try this I get an error message from the debug layer saying the types of the render target and the depth target are not the same (obviously because one is a 3D texture and the other is a 2D texture).
I was going to try making a depth/stencil format 3D texture to use with the render target 3D texture, but D3D10_DEPTH_STENCIL_VIEW_DESC does not provide for 3D textures.
Is it possible in Direct3D 10 to use a 3D texture as a render target with depth buffering? The only "render to volume" sample I found in the SDK is the "AdvancedParticles" sample, and it does not use depth buffering when rendering to slices in the 3D texture.