This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Intel Graphics Performance Primitives library


Postby Hosed » Apr 18, 2003 @ 3:57pm

L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>
User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Postby drgoldie » Apr 20, 2003 @ 11:02pm

hi,

i use the fixed-point library which is included in the IGPP. i have to say that it is really well done. it works fast and just as specified.

the documentation of the IGPP is just as all the intel performance libs: very sparse and assumes that you're a pro on the subject.

i will soon start using the texturing part too.
if i find out something interesting about it i'll post it here. unfortunatelly the IGPP code does not run on the emulator nor under real windows. so i'll have to write additional texturing code for those platforms too... :(

does anybody know if the development on the IGPP was really dropped? intel often just doesn't release updates for quite some time...

btw: if you need performance try the intel xscale compiler. i can not tell any details because of NDA but it should soon be released and will change a lot on the performance side of PocketPC devices. :)

bye,
DANIEL
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Dan East » Apr 21, 2003 @ 1:13am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Sergey Chaban » Apr 21, 2003 @ 3:25am

Straightforward lib is trivial, optimized lib is quite complex (e.g. optimized for XScale like in this case or optimized for general FPU-less RISC machine).
For example, compare their gppDivHP_n_32s routine to naive (32-n).n division implementation [that is (__int32)(((__int64)x << n) / y)].
Intel version is approx. 3 times faster.
However Intel's Inv/Div routines are XScale-only.

SC
Sergey Chaban
pm Member
 
Posts: 72
Joined: Nov 12, 2002 @ 1:45am


Postby Dan East » Apr 21, 2003 @ 5:15am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Sergey Chaban » Apr 21, 2003 @ 5:35am

Sergey Chaban
pm Member
 
Posts: 72
Joined: Nov 12, 2002 @ 1:45am


Postby drgoldie » Apr 21, 2003 @ 9:20am

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby pazazzo » Apr 21, 2003 @ 6:13pm

pazazzo
 


Postby Dan East » Apr 21, 2003 @ 6:46pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby drgoldie » Apr 21, 2003 @ 11:36pm

drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Hosed » Apr 22, 2003 @ 3:31pm

considering the only accuracy limitations in fixed point math is where you place the point all one would need to do is add an additional parameter to their macros (like Intel did). I'm not seeing how this is a deciding factor for using a library that prevents testing on x86 and is very platform dependent. The latter 2 being far bigger issues for me.

Just an FYI, I developed a full features Fixed-point class in about 3 hours (mostly tracking down bugs). Very easy code to write.
L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>
User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Postby drgoldie » Apr 22, 2003 @ 3:39pm

it depends on what you want to be able to do.
the simple solution is to use 16-bits only at all, so you can multiply such two values without having an overflow in a 32-bits register.

but 16-bits is just to small.
but if you want to allow all 32-bits being used, you'll have to work with numbers as large as 64-bits. this is where things become more tricky.

if you want to support functions like: sin,cos,sqrt, etc. then things become a lot more difficult.

of course i'd apprechiate to have the source code of the lib. but on the other side, having carefully hand-optimized assembler code from intel is nice too...

DANIEL
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby efortier » Apr 22, 2003 @ 4:35pm

Last edited by efortier on Apr 22, 2003 @ 4:56pm, edited 1 time in total.
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby refractor » Apr 22, 2003 @ 4:45pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Sergey Chaban » Apr 22, 2003 @ 6:55pm

This ARM docu is very good indeed, but unfortunatelly it doesn't describe some fixed-point techniques that especially useful with ARM CPUs.
Take division for example, they still use integer division, but it's much faster to optimize it with polynomial approximation for 1/x, thus reducing division to a bunch of multiplies and adds.
Same for sqrt.
Sometimes quality also depends on the compiler, for example check out assembly generated by EVC for the code like this:
fixed z = (fixed)(((__int64)x * y) >> 16);
i.e. 16.16 multiply (GCC generates better code in this case BTW);
In fact for multiplication it's even faster to use ARM assembly routine despite the call overhead.
Another example is CPU-specific optimizations - e.g. for stuff like vector dot product it's faster to use certain ARM specific instructions. Or CLZ on XScale to speedup operand normalization for the div approximation above.
If there is no 64-bit mul instruction in the target CPU, that's another set of optimized routines.
Also float<->fixed conversion for FPU-less processors.
That's why really fast fixed-point math library is not exactly trivial ;)
That said I guess that even really simple implementation is still good enough in most cases, even for games.

SC
Sergey Chaban
pm Member
 
Posts: 72
Joined: Nov 12, 2002 @ 1:45am


PreviousNext

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

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 post attachments in this forum