![]() |
|
|
#1 | |
|
Registered User
Join Date: Mar 2005
Posts: 65
|
So here's the burning question.
why is it that sync to vblank sucks? I've been programming graphics for roughly 7 years now and even back in the DOS days, I'd dread the use of calling vsync() once per loop because I know it'd kill the fluidity of the game. Sure you'd eliminate the tearing effect, but at what price? The same thing goes to date with pc's all the way up to now, including linux openGL. Even with a laptop that has a gpu connected to my system with a tight PCI-X bus, it seems as if the system just can't keep a good syncrhonization with the refresh rate clock. I admit that performance of the apps running is a big determinant (if you miss your refresh by 60.01 hz, then you have to wait for the next cycle to draw dropping a whole frame), however I've seen the simplist fastest programs still suffer from this non-fluidity. what I believe to be happening is an inaccuracy of the synch. between the clocking mechanism that the system is using (internal motherboard or gpu clock) and the display device itself. it also doesn't help i'm sure that i'm running a geforce go with a tickless kernel linux by far is not the only OS I've seen suffer from this. windows vista's responsiveness and refresh speed sucks because aero syncs to the refresh rate. However, I must admit that using Mac OSX seems much more fluid to me. Which wouldn't surprise me since the same company that makes the displays also makes the motherboard. Nvidia hardware gurus, what is your take on this? Any way to increase the accuracy sync to vblank? |
|
|
|
|
|
|
#2 |
|
Hey! Lemme smoke
Join Date: Oct 2004
Location: Montreal, Canaduh!
Posts: 1,971
|
Write your app to use triple-buffered VSync. That will give game/app fluidity and with no tearing.
__________________
Evga X58|I7 965 3.8GHz|Ultra 120 Extreme|2 x EVGA GTX 480 SC SLI|2 x Intel X25-M 80GB RAID 0|WD Black Caviar 1TB|6GB Corsair XMS3 1600C8 |Corsair 1000W PSU|Antec Twelve-Hundred|Samsung 305T|Logitech G9|Logitech G15 2ed|LG BH10LS30 |
|
|
|
| Sponsored Ads - Guests Only | |
|
|
|
|
#3 |
|
Registered User
Join Date: Mar 2005
Posts: 65
|
what about with compiz though? compiz seems to suck with fluidity when I'm updating the whole screen (cupe spin, alt+tab, etc), all those are quite choppy
kde4 is worse (fluidity), the user interface speed of vista isn't much better. but i maintain that osx has it down pretty well. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 2008
Posts: 4
|
I'm curious if anyone has any ideas on how to improve the fluidity of composited window managers such as compiz or kwin (kde4)? I'm also experiencing this (on both a NVidia 7600GT and an Intel X3100) and it really destroys the whole 'fluidity' and 'smoothness' image normally given by a composited environment.
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Feb 2008
Posts: 272
|
I'd give a lot to understand why sync to vblank makes compositing choppy. When forcing it on compiz, it benches always at 60 frames a second as it should, but its really lumpy(I read somewhere that its because nvidia does funky hacks with refresh rates...). In 3d games 60 frames a second is silky smooth, I can't understand why I have to have vsync turned off... it ruins all my videos too.
Its the main reason I don't use a composited environment under linux. (note that I've never had any sync problems with aero, the framerate chugs esp when powermizer kicks in, but no texture tearing) |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Mar 2007
Posts: 74
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Mar 2008
Posts: 4
|
I guess the real question is why do I (and others in this thread) experience terrible tearing artifacts on linux but absolutely none on the same hardware with OSX? Is there something happening behind the scenes that can't be fixed?
I get tearing in games (with or without vsync), such as neverball, as well as in compiz and in kwin. I can't speak for Aero - I have never used it. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Feb 2008
Posts: 272
|
I don't play fps games (there are non fps games too you know) with vsync on... not new ones anyway...old games i guess you can get away with it. If the minimum framerate in the game is greater than your refresh rate then the game should play fine.
I assume osx quartz and vista areo both use vsync because there is never any tearing...even in windowed direct3d animations (dunno about ogl in osx)... maybe wolf08 could say. The thing about compiz with videos is that vsync for the xv texture adaptor is turned off for composite (or is it glx...one of the two). So even if you have vsync turned on for opengl the xv will tear... which is a pain. In kwin I only get tearing when it has compositing enabled. However in neverball I can't seem to get any tearing whatsoever...even with sync to vblank disabled. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Sep 2003
Posts: 42
|
There's no synchronization between GL apps when vsync is enabled. Therefore, when a compositor embeds a GL app inside itself with vsync, it's all up in the air which application gets control first after the interrupt.
Current GL-based compositors don't draw immediately after the interrupt, anyway--they use the VideoSync extension to do a poll within the compositor application and draw using dirty rectangles. When the server locks and is drawing for the embedded GL application, the compositor is asynchronously updating from their partially drawn framebuffer, giving you tearing effects. Quartz and Windows have synchronous event systems and integrated window managers, making vsync handling fairly easy. X is a completely different beast to write drivers for. Also, I've extrapolated from the mailing lists that the majority of kwin and compiz authors don't use vsync within the compositor or even use any other GL applications. Chances are, this isn't going to be fixed--ever. This is one of many issues why I don't use, and recommend not using a compositor until both driver and compositor developers make some significant changes. |
|
|
|
|
|
#10 |
|
Registered User
Join Date: Jun 2007
Posts: 47
|
If I have one major grip about the linux platform in general, it wouldn't be closed-source drivers, it wouldn't be flaky suspend and hibernate support, it wouldn't even be the 2nd rate wi-fi state of affairs.. it would be... visual tearing...
For me seeing visual tearing is like someone running their nails down a chalk-board. I don't have synaesthesia however through this sensation I gain some insight into their experiences! I am using KDE 3.5 and have never been able to get vsync to work properly, period. This same machine dual-boots Vista and that syncs perfectly. One day, I really hope that some kind of Kernel/Xorg/NVIDIA/ATI/Intel/KDE/Gnome/Compiz solution is proposed and implemented to solve this issue. There has to be a better way however I agree with your sentiment that this is something that may never be fixed. |
|
|
|
|
|
#11 |
|
Registered User
Join Date: Mar 2008
Posts: 27
|
Ohh.. well now I know at least what does sync to vblank does, it's that 'tearing' that I get sometimes when I'm making a screencast of the whole screen.
I've never ever seen it happen in normal usage though (ati radeon 7500 + compiz or geforce 8600 + compiz). What graphics are you people on? |
|
|
|
|
|
#12 |
|
Registered User
Join Date: Feb 2008
Posts: 272
|
I use a 8600m gt, but tearing for me only happens when there is high motion (ie dragging wobbly windows very fast, fast transitions in videos). I could live with tearing if not for the videos where it is extremely distracting also triple buffering does not work with xv so no relief there
![]() |
|
|
|
![]() |
| Most Popular NVIDIA Based Graphics Cards | |
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|