forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CLUT Optimization

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
starman2049



Joined: 19 Sep 2005
Posts: 75

PostPosted: Mon Oct 03, 2005 5:49 pm    Post subject: CLUT Optimization Reply with quote

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?
Back to top
View user's profile Send private message
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Tue Oct 04, 2005 4:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
starman2049



Joined: 19 Sep 2005
Posts: 75

PostPosted: Tue Oct 04, 2005 6:07 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Tue Oct 04, 2005 6:46 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
starman2049



Joined: 19 Sep 2005
Posts: 75

PostPosted: Thu Oct 06, 2005 4:00 am    Post subject: Reply with quote

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().
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group