CLUT Optimization

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

Moderators: cheriff, TyRaNiD

Post Reply
starman2049
Posts: 75
Joined: Mon Sep 19, 2005 5:41 am

CLUT Optimization

Post by starman2049 »

Does anyone know if there is the same huge performance hit with CLUT entries referenced in local RAM as there is with the texture data? I was thinking that sceGuClutLoad() might just load a table in VRAM/other ram, rather than just tell the gu where the palette data is. does anyone know?
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

That's true, the only hit you may take is that the palette upload will be slightly slower.

Though I have not actually benchmarked and seen if there is a measurable difference.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
starman2049
Posts: 75
Joined: Mon Sep 19, 2005 5:41 am

Post by starman2049 »

Thanks! Just so I am clear, your understanding is that you call sceGuClutLoad() and this transfers the palette to a reserved table in VRAM (or other gu RAM). Is that right?
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

you should see a good speed
advantage by loading clut
in user space mem (24MB) and then
transfer to VRAM(2MB) since transfer
from main mem to gu mem is around
150MB/s bandwidth ;)

of course you could just load direct to
VRAM and use your color lookup table
through there and keeping it a constant
address in VRAM, considering gu ram
has 500MB/s bandwidth then this
should be more than ample to
whatever your clut needs are ;)

remember copying from memstick
to user mem and gu mem is the same
speed or bandwidth so whatever method
works for you is best .....first is generally
used if say VRAM is used exstensively
10011011 00101010 11010111 10001001 10111010
starman2049
Posts: 75
Joined: Mon Sep 19, 2005 5:41 am

Post by starman2049 »

Update:

Just as a test, I loaded my CLUT entries into VRAM, then did my sceGuClutLoad() pointing from VRAM and there was no noticible performance improvement. I make heavy use of CLUT textures and am pretty sure I am rendering bound so my conclusion is that it looks like when the GU is retrieiving a texel with CLUT textures it gets the color from a private look-up table that is filled with sceGuClutLoad(), rather than pointing to an address referenced in sceGuClutLoad().
Post Reply