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 

GE RAM -> VRAM transfers, continued

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



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue Jul 26, 2005 7:32 am    Post subject: GE RAM -> VRAM transfers, continued Reply with quote

Ok, after locating a bug in a small test I did weeks ago, we now have a much speedier way of copying data from RAM to VRAM:

int sceGuCopyImage(int psm, int sx, int sy, int width, int height, int srcw, void* src, int dx, int dy, int int destw, void* dest);

using it like this:

sceGuCopyImage(GU_PSM_8888,0,0,480,272,512,src,0,0,512,(void*)((u32)dest+0x4000000));

will give you around 305 frames per second, or 151MB/s, which is triple the bandwidth amount that the blit-sample outputs right now. This requires that the source and destination are the same pixelformat though, but if you need pixelformat conversion, you can always do the standard blit afterwards, as VRAM -> VRAM blitting is much speedier (so you won't have to loose your scaling blit or bilinear filtering).

If you need the current drawbuffer pointer, remember that sceGuSwapBuffers() will return it when called.

I've updated GU and added another sample to demonstrate this technique. Thanks to Shine who inspired me to go back and re-examine this function. :)
_________________
GE Dominator
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue Jul 26, 2005 6:48 pm    Post subject: Reply with quote

That's great news, thanks!

I'm kinda hoping that someone fixes the screendriver so it will support the virtual display. I experimented with setting the virtual display to 470x544, and that works, but there's no code in place yet that scrolls the screen downwards when the mouse reaches the bottom of the screen.

I'm a bit new to this kind of programming, so I'm not sure if the best way would be to use the function you mentioned, or if you can just move the vram pointer downwards a line at a time for scrolling down. What do you think would be the best approach?
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