Hi,
On Freitag 29 April 2005 01:33, Paul Kahler wrote:
> What's wrong with just using double precision? If it's because this math
> is done on the video card then fine. In ray tracing I switched to
> doubles over 5 years ago and measured only a tiny penalty which was more
> than made up for by the reduction of artifacts. Single precision is so
> 20th century.
:)

I think the most important thing now is that plibs scenegraph is only 
available in single precision.

I assume that your raytracing program timings runs on an i*86 type cpu without 
using mmx/sse extensions and not using the gpu to do computations?
If so, this timings are not meaningful. An i*86 just uses the same registers 
and the same precision for all computations. This precision is by default 
even more than 64 bit double (which makes the i386 in some sense a non ieee 
machine and could be the reason for really strange bugs). Shure you can 
switch the precision to a lower datatype, but this switch is much more costly 
than executing one flop. As a result most programs will just leave that at 
the default (96 bit extendend precision) for performance reasons.
The time to execute one multiplication/addision/subtraction is exactly the 
same for each precision (throughput is at about 1 flop per cycle), so even if 
you swiched the precision down to single precision at the beginning of your 
program, the operations which are mostly used performe exactly the same.
Only divisions, sqrt, sin/cos and such more complicated assembly instructions 
take less computation time iff you changed the fpu control word to single 
precision.

This situation improoves a with the vector valued fpu extensioins like sse et 
al ... (like mesa uses inside and very most propably are used in the closed 
source drivers from nvidia/ati for non gpu operations too).
You can execute operations on one smid register at a clock cycle. That means 
either 2 doubles or 4 floats at a time, that is twice the throughput with 
floats.
Also different cpu's like virtually nearly all non x86 (at least I know sparc, 
alpha and ia64 for shure) have extra assembler instructions for single and 
double precision floatingpoint oprerations and they perform different.

Apart from that I am not shure if any of those gpu's can really compute with 
floats or doubles like we know them from cpu's. I expect that they support 
some internal format with some precision. May be a fixed point format, may be 
an other one. Even if the OpenGL interface will take floats and doubles, 
there is no guarantee that it does not use singles for all computations 
internally (True? Or is there a paragaph in the OpenGL standard?).
That means that you might have jitter, even if all your transforms stored in 
the client application are in double precision.
And if there are different gpu floatingpoint/fixedpoint formats available, I 
do not know if they will perform better or worse with different precision, 
which is not that unlikely.

Does anybody have better knowledge about the internals of gpus?

   Greetings

        Mathias

-- 
Mathias FrÃhlich, email: [EMAIL PROTECTED]

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to