I was chasing a bug that only appeared in celestia 1.4.1 after a cold reboot, when GL_ARB_vertex_program was enabled. I forwarded the bug to the Linux DRI developers (Radeon R200), who replied:
I can confirm the celestia problem - the shadow on the ring doesn't flicker
here, but is just missing instead though. However, this is actually not our bug,
this is a celestia bug. Celestia's shader do not properly initialize the output
registers, so the q tex coordinate ends up uninitialized. This is an important
difference to NV_vertex_program, where you do not need to initialize the output
(and temp) regs. In particular, in rings_vp.arb only s and t (x,y) coords are
written to tex coord sets 0 and 1, r and q (z,w) are not touched. (Other shaders
have the same problem, but it doesn't seem to cause problems). Apparently, if
you use the multitexturing path, that coordinate is written (even if it doesn't
really work), and it seems that this state even survives a reboot.
Here's the warning from the ARB_vp extension:
"If conventional OpenGL texture mapping operations are performed, a
program should always write to the "w" coordinate of any texture
coordinates result registers it needs to use. Conventional OpenGL
texture accesses always use projective texture coordinates (e.g.,
s/q, t/q, r/q), even though q is almost always 1.0. An undefined q
coordinate (coming from the "w" component of the result register)
may produce undefined coordinates on the texture lookup."