SDL Rev 1273 Problems

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

Moderators: cheriff, TyRaNiD

Post Reply
Garak
Posts: 46
Joined: Wed Jul 27, 2005 1:59 am

SDL Rev 1273 Problems

Post by Garak »

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
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

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.
urchin
Posts: 121
Joined: Thu Jun 02, 2005 5:41 pm

Post by urchin »

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)
Garak
Posts: 46
Joined: Wed Jul 27, 2005 1:59 am

Post by Garak »

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
Post Reply