I think there may be a bug in the nv30 emulation as when I enable a simple fragment program, to simply write out the incomming color, the z-values written are slightly different than if the fragment program is not enabled.
What I did to test was this:
-Setup z-buffer tests as usual
-Enable the simple fragment program
-Render geometry
-Disable fragment program
-Clear the color buffer
-Set z-buffer test to GL_EQUAL
-Render the geometry again
(Note that I am not touching the out-put z value in the fragment program and no vertex programs are enabled. )
The out-put of this is the common horrible z-fighting. Disabling the fragment program produces the expected results.
It was my understanding that the fragment programs produced the same z-buffer out-put if the z value was not written to. Am I correct in assuming this?
BTW my driver version is 40.41