exp instruction in NV_vertex_program

I’m using a GeForce2 GTS Pro and the 30.82 drivers, and I have the following problem with the exp instruction of NV_vertex_program:

I have the following vertex program with c[0] = {-1.8, -1.2, 0.0, 0.0}:
exp R0.y, c[0].x;
mov o[COL0].x, R0.y;
exp o[COL0].y, c[0].y;
So what this basically does is calculate the fraction of c[0].x and c[0].y and put it in o[COL0].
As expected, this yields a greenish color, since exp calculates src-floor(src) in .y, which is -1.8-(-2) = 0.2 for -1.8 and -1.2-(-2) = 0.8 for -1.2.

Now, if I change the program to this:
c[0] = {1.8, 1.2, 0.0, 0.0}:
exp R0.y, -c[0].x;
mov o[COL0].x, R0.y;
exp o[COL0].y, -c[0].y;
I get a red color, just as if I didn’t specify the - in front of the c[0] every time. Why is this? Shouldn’t it be the exact same result as above (that is, green)?

I tried the same vertex program in DirectX 8.1 using similar code to the one above and also the frc macro instruction, and DirectX gives results as expected (even though it explicitly says in the docs that passing in a negative value to exp produces undefined results, but still the .y component of the result is apparently calculated correctly).

Anyone have any ideas?

Regards.

[This message has been edited by Asgard (edited 09-02-2002).]

Well, I’m answering myself here, but I had a friend who owns a GF4 (running 30.82 drivers) try out my code above. He gets the correct result (that is, green) with both versions of the posted code above. So the problem I encountered on my GF2 seems to be a bug in the vertex program software emulation of the NVIDIA drivers.

Regards.

Originally posted by Asgard:
[b]Well, I’m answering myself here, but I had a friend who owns a GF4 (running 30.82 drivers) try out my code above. He gets the correct result (that is, green) with both versions of the posted code above. So the problem I encountered on my GF2 seems to be a bug in the vertex program software emulation of the NVIDIA drivers.

Regards.[/b]

Sounds like a driver bug. Two things that would be of some interest:

(1) Does this failure occur with the new Detonator 40 drivers?

(2) Do you have a simple test you could send me? Should be easy to repro, but it would be useful for me to confirm that the fix indeed fixes your problems.

Thanks,
Pat
(pbrown ‘at’ nvidia.com)

Quick follow-up: I was unable to reproduce the problem with our latest driver source. In our source code database, I see a specific fix for this problem, which was a driver bug affecting GeForce2-generation parts only. It should work fine with NVIDIA’s Detonator 40 drivers. Sorry for the inconvenience.

Please email me if you are still seeing this problem.

Thanks, I will try the new drivers. I need ARB_vertex_program anyway
Thank you very much for looking into this for me.
Cheers.

EDIT: I’ve just installed the new drivers and my problems are gone. Thanks again.

[This message has been edited by Asgard (edited 09-03-2002).]