Envmap performance way below par

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

Moderators: cheriff, TyRaNiD

Post Reply
Podj
Posts: 3
Joined: Sun Dec 18, 2005 8:53 am

Envmap performance way below par

Post by Podj »

So this 33 million flat unlit polys / second statistic is repeated everywhere.

Trying to get an idea of what homebrew can do, I bumped up the number of rows & slices in the gu\envmap sample to 96. Meaning there should be approx 100*100*2 (20000) tris in that torus. And the framerate drops to 40. Add another torus, the framerate drops to 20. 100*100*2*40 is a mere 800,000.

I didn't expect this sample to be fast but I didn't expect it to be that slow, either.

I turned off the lighting and texturing - no difference.

So what's the bottleneck?
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Been a while since I looked at that sample, is it using a swizzled and mipmapped texture? If not, the texture cache is most likely destroying the performance.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Post by ufoz »

Um, he says he turned off the texturing.

Maybe the geometry should be in VRAM or something? That ought to speed things up a bit.
gr8dane
Posts: 16
Joined: Thu Aug 18, 2005 11:10 am

Post by gr8dane »

Just going off memory here since I do not have that sample within reach.

1/

The sample uses X,Y,Z and Normals as floats. To increase performance they could be cut to bytes which would yeild a savings of 18 bytes per vertex.

2/

The sample furthermore does not do any form of tri-stripping. Doing tri-stripping would yeild a great performance boost. It will cut the number of vertices needed to be fed to the hardware.

3/

The sample uses indexed vertices. Indexed vertices on the PSP is very very bad. Use only a triangle list, or even better, non-indexed triangle stip(s) for more performance.
Dr. Vegetable
Posts: 171
Joined: Mon Nov 14, 2005 1:32 am
Location: Boston, Massachusetts
Contact:

Post by Dr. Vegetable »

Although if I understand what you both are saying, doing (2) tri-stripping would remove surfaces from the test. It seems that the goal is not to optimize rendering of these torus examples, but to benchmark the PSP's rendering performance.
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Oops, too tired, sorry :P
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Dr. Vegetable
Posts: 171
Joined: Mon Nov 14, 2005 1:32 am
Location: Boston, Massachusetts
Contact:

Post by Dr. Vegetable »

...Good tip in general, though.
Podj
Posts: 3
Joined: Sun Dec 18, 2005 8:53 am

Post by Podj »

Why is indexed bad? Is it doing it in software?
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

Post by Jabberwocky »

With indexed you have to read the index, then the vert (done by hardware). In non-indexed, you just read the vert. So, basicly, you have an extra read involved with indexed mode. If space is your concern rather than speed, indexed can be good, otherwise it's bad... ;o)
Post Reply