Well, isn't that just special? I've been writing some tests for NV_fragment_program_option before merging the asm-shader-rework-2 branch to Mesa master. While doing that, I came across a neat case on shipping drivers on real hardware. These two code sequences produce different results:

    ADDC    R0, R0, |R0|;
    MOV R1 (NE), {1.0};

and

    ADD R0, R0, |R0|;
    SNE R1, R0, {0.0};

I don't think the absolute-value operator has anything to do with it, but that's how my test case was written. Gosh... if the ADDC doesn't set the NE condition code, I'd expect the result in R0 to be equal to zero. Have I gone completely mad?!?

idr puts a paper bag on over his head...
It turns out that 0.0 and {0.0} are different as constants in fragment and vertex programs. The former expands to a vector of {0.0, 0.0, 0.0, 0.0} as you would expect. The later, which is what I used in my program, expands to {0.0, 0.0, 0.0, 1.0}. This follows the same rules as, for example, glVertex3f, glColor3f, etc., so it's not too insane. Ah... the joys of coding in assembly.
Comment by IanRomanick Thu 24 Sep 2009 11:34:17 AM PDT