Settings gcc flags to match qvm specs

Post your ioquake3 stuff here.

Moderator: Monk

Settings gcc flags to match qvm specs

Postby rabusmar » Sun Mar 07, 2010 4:48 am

Hello. I've been working on a q3 mod, which for some modifications on the game code it uses a binary instead of a qvm, but the client still uses the qvm. So far works good, however, we started to feel little differences on the "feeling" of the physics, and they are not entirely wrong: we have noticed small differences on the results on the predicted pmove executions and the snapshots from the server.

Reading a little bit we found out that setting gcc with both -O and -ffast-math flags causes some floating point discrepancy, however we think that the real root of the problem is the architecture of the virtual machine used by the qvm. As far as we've read (correct me if I'm wrong), the qvm calculates floating point operation as single precision float (32 bits), while the binary makes them as double precision and just truncates them when casting or assigning to float. So my question is basically if there is some flags (or combination of flags) i can check on gcc (i'm using v3.4) so the floating point operations are as close as possible to the ones made by the qvm.

Regards
rabusmar
 
Posts: 1
Joined: Thu Mar 04, 2010 12:43 am

Re: Settings gcc flags to match qvm specs

Postby Monk » Sun Mar 07, 2010 4:48 pm

I would ask on the mailing list or in IRC. That's kind of an involved question and I know people who muck with the QVMs tend to hide in those two areas rather than frequent the forums.
Monk
 
Posts: 275
Joined: Thu Aug 21, 2008 12:27 am


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron