Tearing Only With SDL With Composite Extension Loaded

I’ve got a bizarre issue. It seems that when I have the Composite X extension loaded, but no actual compositor in use, SDL applications (and only SDL applications) using OpenGL exhibit tearing near the top of the screen.

This is best noticed with the Darkplaces Quake port, which has both SDL and GLX versions. The SDL version shows a tear about an inch from the top of the screen, while the GLX version is perfect.

I’ve attached a test case that demonstrates the problem, though less effectively. With this program I get a tear just several pixels from the top. I suspect this has to do with less intense GPU usage versus darkplaces.

See: [url]https://sites.google.com/site/bearoso/misc/tearing.tar.gz[/url]

Run make to build the files. tearing_sdl should show the problem slightly, while the tearing_glx program is seamless.

I’m not sure when this problem appeared, because I kept the composite extension disabled until recently. I haven’t tried this with SDL 2.0, but seeing as it’s not backward compatible, that’s a moot point.

Log: [url]https://sites.google.com/site/bearoso/misc/nvidia-bug-report.log.gz[/url]

See previous discussion.

It’s a bug in SDL 1.2. The patch is in AUR (“backingstore_on_demand.diff”), linked to from Arch thread.

Thanks for the info. I’d searched for an existing discussion before, but that never turned anything up.

There’s also other nvidia-related setup regarding SDL ;)