Floats in the protocol

Jim Gettys jg at laptop.org
Tue Jan 6 08:08:11 PST 2009



On Tue, 2009-01-06 at 08:01 -0800, Keith Packard wrote:
> On Tue, 2009-01-06 at 13:41 +0100, Simon Thum wrote:
> 
> > On XDS 08, Keith suggested simply putting them on the wire. That is,
> > require IEEE756 32 bit and account for endianness.
> 
> GLX already uses both 32 and 64 bit IEEE floats on the wire, so I don't
> see any reason to use something different here.
> 
> I'd like to add floats to the render protocol as well, mostly for
> matrices where fixed point values cause significant errors.
> 

The reason for avoiding floats in the core protocol was that in that
era, we had a number of platforms that were not IEEE compliant (e.g.
older VAXen, Cray).  That is no longer an issue.

Differing behavior in NAN and soft underflow situations seems to be
something we have to live with anyway; and is certainly much less evil
than the previous disaster.  Converting to a string format then brings
up a whole other set of conversion disaster possibilities.

KISS: let's go with IEEE....
                              - Jim

-- 
Jim Gettys <jg at laptop.org>
One Laptop Per Child




More information about the xorg mailing list