Writing to depth buffer from opengl compute shader
<p>Generally on modern desktop OpenGL hardware what is the best way to fill a depth buffer from a compute shader and then use that depth buffer for graphics pipeline rendering with triangles etc?</p>

<p>Specifically I am wondering about concerns regards HiZ.  Also I wonder if it's better to do compute shader modifications to the depth buffer before or after the graphics rendering?</p>

<p>If the compute shader is run after the graphics rendering I assume the depth buffer will typically be decompressed behind the scenes.  But I worry done the other way around the depth buffer may be in a decompressed/non-optimal state for the graphics pipeline?</p>