OpenGL - New Build in the works

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
bogglez
Moderator
Moderator
Posts: 576
Joined: Sun Apr 20, 2014 9:45 am
Has liked: 0
Been liked: 0

Re: OpenGL - New Build in the works

Post by bogglez » Tue Aug 23, 2016 8:39 am

Sorry for the necro post, but I actually tried this fmac implementation in my raytracer (640x480, shadows, reflections, so quite a lot of float ops) and compared it to simply using x*y + z.

x*y + z 68178108 ticks
fmac: 70670368 ticks

So Ph3nom, I advise you don't use this piece of inline assembly.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: OpenGL - New Build in the works

Post by PH3NOM » Tue Aug 23, 2016 9:15 pm

Lol, back when I was young again :lol:

The final version of that code, my clipping routine used in KGL, does not use fmac :?

The problem with using FMAC is the way that operation uses the registers, it really only makes efficient use when you already have one of the multiplicative operands in FV0.
Otherwise, you are better off using normal math operations.
Post Reply