5 Replies Latest reply on Feb 11, 2012 10:39 AM by zakmckracken

    Tearing on Second head


      I have an applicaiton that displays video written in OpenGL.  In short I need to coordinate my SwapBuffers() with the vertical resync to stop tearing.  This solution needs to run on either head and needs to work when multiple OpenGL applications are running.

         I find that the “wait for vertical sync” feature controlled from the catalyst control panel always syncs you to the primary display even if your window is on the secondary display.  Also it seems to do a round robin thing if more then one OpenGL application is running.  (ie.  If two are running they get alternating vsync events and end up dropping every other frame)


         I have tried getting the timing information directly from the GPU with register reads and waiting for vertical blanking myself but I can't seem to find a method on a windows machine that will let me sleep with the accuricy I need.  Polling the register isn't an option as I just can't use that much CPU.


         Any Ideas?   Am I missing the "usual" way to solve this problem.  I assume others have run into this issue but I can't seem to find anyone talking about it on the web.


      System:  Windows XP/ATI Driver 8.88/4690 GPU

        • Tearing on Second head

          To control vertical sync programatically from your application, you can use the wglSwapIntervalEXT function (which is part of the WGL_EXT_swap_control extension). The round-robin behavior for multiple applications is a known issue which we are working on. Syncing to the wrong monitor could also be a bug, but using the swap interval function may work around it as the control comes directly from the OpenGL application rather than 'forcing' the setting. If that doesn't work for you, let us know and we'll investigate.



            • Tearing on Second head

              I am using WGL_EXT_swap_control but I really don't see how this will help.  It just turns on the "non working" wait for vertical sync, unless I'm missing something.

              I'm currently polling a high resolution timer in a low priority thread to wait for vsync based on chip register reads.  Lots of work to work around the problems and it reports a lot of CPU load even though my thread is low priority.  Customers won't want to use my library if they see 30% load just by linking me in.  I think this really has to be addressed at the Driver level.

              It would be nice if these issues were solved.  How can I be notified when a driver release is issued that addresses these issues?



            • Tearing on Second head

              Test case sent..  Problem registered into AMD system..  Still no solution suggested workaround or driver fixed.

              Anyone else effected by these issues?  Time to chime in and ask AMD to fix these issues.


              I have written code that reprograms the 46xx chip I'm using so the second head gets it's timing from the first head so as long as both monitors are the same and in the same resolution both heads do their v-sync at the same time. 

              But I have no work around for the "round robbin" problem where only one OpenGL context is processed for each Vsync. 

              SO if two OpenGL applications run on a 60hz system each only gets 30hz.  Three give you 20hz and so on.

                • Re: Tearing on Second head

                  1. In the CCC you can select which of the screen has the primary desktop. The sync will be bound to that screen.

                  2. I have the same problem with the syncs for two contexts. Do you have found a solution yet? I was trying to use wglSwapIntervalEXT to let the first SwapBuffers run without vsync and only the second one with vsync. It works but unfortunately not perfect, since a sharp tearing shows up (I even don't know why the position is not depending on scene complexity...)) . I was trying wait with the buffer swap until calling the "last" one and then swap all previous buffers by make them current again, but this does not work at all: Now only the "last" buffer is shown at all...

                  Any ideas?



                  PS> Running Win7 without aero...