Is it ok to capture the depth buffer into a texture once scene is rendered and then just refill it from the texture? Something like this:
gl_FragDepth = texture2D(depthTexture,coords).r;
I am looking for a way to avoid rendering geometry twice just to fill the depth buffer for another op. (I am not using FBO right now).