| View previous topic :: View next topic |
| Author |
Message |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Wed May 24, 2006 11:14 pm Post subject: No ScePspSMatrixN? |
|
|
I am playing around with some optimisation and was going to go fully 16 bit.
That seems ok for colours and for vertex positioning, but there's no 16 bit matrix types in psptypes.h
Is this because it just doesn't make any sense, is not technically useful or just plan dumb?
Or could I make my own and it would increase the speed? |
|
| Back to top |
|
 |
ReKleSS

Joined: 18 Jun 2005 Posts: 73 Location: Melbourne, Australia
|
Posted: Thu May 25, 2006 6:44 pm Post subject: |
|
|
Someone more knowledgeable should probably follow this up, but I don't think you're going to get much of a performance gain by going to 16 bit. Most of the PSP's internal hardware should be 32 bit - it's going to take the same time to process 16 or 32 bits. It makes a difference to the GU for texturing, but that has more to do with memory bandwidth than anything else.
-ReK
(Like I said... someone, please confirm this for me.) |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Thu May 25, 2006 8:42 pm Post subject: |
|
|
The GE only eats floats for the matrix data, so using shorts for your matrices is completely useless from a performance POV (you'd have to convert whenever you wanted to load one to the hardware), not to mention the precision issues you'll get. _________________ GE Dominator |
|
| Back to top |
|
 |
white rabbit
Joined: 06 Jul 2005 Posts: 60
|
Posted: Fri May 26, 2006 6:19 pm Post subject: |
|
|
Cheers guys, I'll stick with floats then.
BUT...
I want to reduce the size of my vertex structure to 12 bytes - from other threads this seems to be the upper limit before a performace hit.
So if I have something like:
| Code: |
struct Vertex
{
char u, v;
char nx, ny, nz;
short x, y, z;
};
|
Then I can use the GE to matrix multiply the numbers when rendering, but what if I need to do it for myself? Do I need to integrate some asm VFPU routines into my C or should I RTFM / LATFS the SDK for the answers?
Thanks again |
|
| Back to top |
|
 |
|