Hi,
To give a bit of background, the development of this test comes from a nine bug in a game with fog, despite getting good results in wine tests. While investigating the bug, I realized that I had misunderstood the documentation, and possibly the others before me as well, as I think neither nine, nor wined3d, nor dxvk have completly correct formula here.
Here is the patch for nine, and the lengthy explanations in the commit message: https://gitlab.freedesktop.org/axeldavy/mesa/-/commit/b337b0d0f89112266669ee...
Basically wine tests use an orthogonal projection matrix, and the case of the non-orthogonal projection matrix was not studied enough. This merge requests fills the gap. The tests show than when a non-orthogonal projection matrix, w is used for fog not z (wfog), no matter what the shaders are. Depthbias, etc do not affect w. In many places where w should be used, using z doesn't give something that looks bad because in many cases the range of z and w is similar, and so the fog formula gives close results. Still that's not the correct output for someone who cares about accuracy.
The odepth test is to know whether zfog (orthogonal projection matrix) is impacted by writing odepth. This is due to the r300/500 hardware manual showing there is fog named registers which tell whether to pick the depth writen by the shader or the depth outputted by the rasterizer. It seems that odepth doesn't affect in practice though, but it's good to have it tested.