forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fixed point & floating point

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
tumnes



Joined: 17 Sep 2004
Posts: 23

PostPosted: Thu Mar 16, 2006 2:47 am    Post subject: Fixed point & floating point Reply with quote

ok, lets say I send a bunch of vertex data (floats) to vu1 for processing. At the end of processing I would have to convert them to fixed point so that they can be sent to the GIF right?

The XYZ2 register accepts 16bit fixed point values for x and y, but the Z value is 32 bit unsigned integer. Ok, so I guess its not a big deal because there are vu instructions to do this easily.

Even though the fixed point values would be 32 bits in vu memory, the upper bits would just be chopped off to make it 16 bits for x and y.

I just found it kinda strange, but I guess it is more efficient for the GS to be doing operations with fixed point numbers rather than floating point?

Also it seems most of the instructions operate on floating point numbers rather than integer (fixed point). So would it be kinda pointless to just send fixed point data to vu1 in the first place? I am guessing they use floating point for better accuracy?
Back to top
View user's profile Send private message Visit poster's website AIM Address
enos_feedler



Joined: 25 Aug 2006
Posts: 4
Location: Toronto, Canada

PostPosted: Sat Aug 26, 2006 3:03 pm    Post subject: Reply with quote

It is much more efficient for the GS to do operations in fixed point vs. floating point. If we are talking about the GS hardware circuits, fixed point circuitry is much less complicated then floating point and therefore requires less silicon real estate (and less hardware clock cycles to compute). So cost and and performance are probably the reasons for the fixed point implemetation in the GS. However, with fixed point you obviously lose precision and range compared to floating point values. However, it was probably determined that the extra precision did not affect image quality, and a smaller (cheaper) chip was more important.

-Jeff
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group