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 

SDL Rev 1273 Problems

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



Joined: 27 Jul 2005
Posts: 46

PostPosted: Thu Nov 03, 2005 2:26 pm    Post subject: SDL Rev 1273 Problems Reply with quote

Greetings,

I noticed a new SDL was added to the SVN, and I updated. I just installed the new SDL over my old copy. It appears that images draw to the screen MUCH faster, nice job. But there are several unfortunate side effects that I am noticing.

1. When my images are drawn to the screen, some images will overlap others. Thus, it appears images are not being drawn to the screen in the order I am actually drawing them.

2. There is a tearing effect each time I draw a frame to the screen. I have tried calling sceDisplayWaitVblankStart(); before calling SDL_Flip(screen); and not calling it. I always get the tearing effect.

3. It seems the SDL no longer loads or displays images over 750K correctly. I have a large image file, and I draw portions of it to the screen each frame. The image is not drawn correctly. I noticed this happens for my images greater than 750K. The resolution of the image is 480x590.

My screen is setup in 16bit mode as a hardware surface and it uses double buffering. I went back and converted all of my images to HW surfaces after loading them. I only updated SDL, I did not update any of my other SDL_ libraries. With the previous version of SDL (REV 1155) I did not have any of these problems. All help is appreciated!

Garak
Back to top
View user's profile Send private message Send e-mail AIM Address
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Thu Nov 03, 2005 5:57 pm    Post subject: Reply with quote

thanks for the feedback, Garak. here's my thoughts:

1. I suspect a sceGuSync at the start of the HWAccelBlit will fix this. Let me know if it does.

2. I would think that there would be no tearing with a WaitVBlank... perhaps you could show me the source?

3. The blit function currently executes sceGuTexImage with the entire source image. I made compensations for a width greater than 512 because I wanted to scale 640x480 (as used by SMC, Abrick and Lopan). I've reused the blit for hwsurfaces and I guess that sceGuTexImage doesn't appreciate heights greater than 512. Ideally, only the specified portion of the source image would be passed to sceGuTexImage - but I'm still working on that.
Back to top
View user's profile Send private message
urchin



Joined: 02 Jun 2005
Posts: 121

PostPosted: Thu Nov 03, 2005 7:29 pm    Post subject: Reply with quote

I added vsync support into my emulator the other day and I get no tearing. I had to do a bit of profiling to ensure everything was happening in the time allowed, but I got there in the end (mostly by disabling alpha on surfaces that didn't need it)
Back to top
View user's profile Send private message
Garak



Joined: 27 Jul 2005
Posts: 46

PostPosted: Sun Nov 06, 2005 2:03 pm    Post subject: Reply with quote

Thanks to rinco, all of the issues I mentiond have been resolved. I downloaded the latest SDL, and everything worked great. Very nice job on the speed increase when drawing graphics. Keep up the good work.

Garak
Back to top
View user's profile Send private message Send e-mail AIM Address
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