No ScePspSMatrixN?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
white rabbit
Posts: 60
Joined: Wed Jul 06, 2005 7:03 pm

No ScePspSMatrixN?

Post by white rabbit »

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?
User avatar
ReKleSS
Posts: 73
Joined: Sat Jun 18, 2005 12:57 pm
Location: Melbourne, Australia

Post by ReKleSS »

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.)
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

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
white rabbit
Posts: 60
Joined: Wed Jul 06, 2005 7:03 pm

Post by white rabbit »

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: Select all

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
Post Reply