PDA

View Full Version : ARB_fragment_program: Float precision



esc
12-03-2003, 08:12 AM
Hi,

My ARB2 path (ARB_vp & ARB_fp) is half as fast as my NV20 path (NV_vp & reg.combs.) in many cases, despite ARB2 is one pass and NV20 is 2 passes.

So I thought it might be because of s23e8 precision (I send most data as texcoords).

Then I read Kilgards post: http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/010154.html

Then I looked in the ARP_fp spec, and found a comment about "ARB_precision_hint_fastest".
But that doesn't exist, at least I can't find it.

Is there any good docs about precision per instruction and precision per vertex-channel anywhere?

Ostsol
12-03-2003, 09:31 AM
ARB_fp is can use only a single precision globally. You cannot set the precision on a per-instruction basis.

Humus
12-03-2003, 11:07 PM
Originally posted by esc:
Then I looked in the ARP_fp spec, and found a comment about "ARB_precision_hint_fastest".
But that doesn't exist, at least I can't find it.

What do you mean with "doesn't exist" / "can't find it"? http://www.opengl.org/discussion_boards/ubb/confused.gif

Add this on top of your shader, and it should do the trick:

OPTION ARB_precision_hint_fastest;

esc
12-04-2003, 02:09 AM
Originally posted by Humus:
Add this on top of your shader, and it should do the trick:
OPTION ARB_precision_hint_fastest;

Of course, stupid me, thanks!

However, I'm still confused about Kilgards post (link above) about Geforce FX's varying precision:


Originally posted by Mark Kilgard:

The per-fragment fragment program operations (ARB_fragment_program) are performed with s23e8, s10e5, or s1.10 numerics depending on the instruction & register formats.


Is there anyway of finding nVidias specs for this? Or does it change per driver or hardware chip?

I just thought that knowing this more closely would help optimizing, or should we (app. programmers) leave it all to the drivers people?

/Chris

Tom Nuydens
12-04-2003, 02:44 AM
You don't get access to these different precision modes with ARB_fp. Unfortunately, the precision hint doesn't seem to make much difference either. The only way to exploit the multiple precisions fully is to use NV_fp.

-- Tom

esw
12-06-2003, 04:05 PM
Currently, precision hint is not used (as Tom said). Expect future drivers to use precision hint more, though it is still a hint and subject to interpretation between drivers/chips/vendors etc.

Eric