I need both a stencil and depth buffer for my OpenGL app. The depth buffer at least needs to be rendered to texture via a framebuffer object, so that I can do deferred shading and other post-processing effects. I already have this framebuffer set up (using GL_DEPTH24_STENCIL8), but I have some concerns and questions.
First, I would like to use a 32-bit floating-point depth buffer. The GL_DEPTH32F_STENCIL8 option seems to be the most obvious. What I would like to know is, what is the actual memory footprint of this format? Logically it would be 40 bits, but knowing what I do about alignment, it wouldn't surprise me if they padded it to 64, and many sources say that's exactly what happens. I would like to know for sure.
Perhaps keeping the depth and stencil buffers separate would be better for me? Do I have to worry about this not being supported? How about cache efficiency, as stencil and depth tests are often performed together?
PS. I'm not using multisampling.