GL_DEPTH32F_STENCIL8 is actually a 64-bit format, so will require twice the bandwidth for some operations. GL_DEPTH24_STENCIL8 on the other hand can be interleaved in a single 32-bit value.
That sounds reasonable as well, but makes the entire notion of stencil culling in VR useless, as I would need to draw the stencil each frame (or without stencil direcly into depth).
Is there a separate format or are Stencil and Depth too intertwined on HW?
makes the entire notion of stencil culling in VR useless
The stencil test isn’t a feature that exists solely for VR use.
Also, how complex is your stencil pattern that redrawing it every frame is an expensive operation?
Is there a separate format or are Stencil and Depth too intertwined on HW?
Let’s put it this way.
The Vulkan specification does not require implementations to support any stencil-only format. They are however required to support at least one combined depth/stencil format.
And Vulkan as a specification doesn’t even allow you to use separate depth and stencil buffers in the framebuffer. Framebuffers and subpasses only have a single attachment location for combined depth/stencil. And therefore, you can only use one image, which contains either depth, stencil, or depth/stencil.
You’re not allowed to have separate depth and stencil images to be used for depth and stencil operations.
Another option: Try not using the stencil buffer at all. Just render the hidden area mesh into the depth buffer with depth=0 (assuming you’re using a standard depth buffer setup).