[visionegg] Re: OpenGL latency

  • From: "Sol Simpson" <sol@xxxxxxxxxxxxxxx>
  • To: <visionegg@xxxxxxxxxxxxx>
  • Date: Tue, 30 Jan 2007 06:26:15 -0500

I think my wording was confusing, when I said:

> see a variable delay between 0 and retrace rate msec depending 
> on when buffer_swap() was called.

The delay I was referring to was the time between when swap_buffers()
returns and when the display is actually updated. 

So swap_buffers() was not waiting until VBLANK / retrace start to return on
any of the video cards or systems we tested. The actual screen updates were
synced with the VBLANK though; it is just that swap_buffers() return time is
not.

Also, if you get time just before and just after the call to swap_buffers(),
then you can see it is returning right away (assuming there is no drawing
being done or another swap pending causing the swap_buffers() call to
block).

Sol Simpson
SR Research Ltd.


-----Original Message-----
From: visionegg-bounce@xxxxxxxxxxxxx [mailto:visionegg-bounce@xxxxxxxxxxxxx]
On Behalf Of John Christie
Sent: January 29, 2007 4:47 PM
To: visionegg@xxxxxxxxxxxxx
Subject: [visionegg] Re: OpenGL latency


On Jan 29, 2007, at 2:47 PM, Sol Simpson wrote:

> If your program calls buffer_swap() less than once per retrace,  
> then the
> buffer_swap() is not blocked and returns right away and not  
> necessarily at
> the start of a retrace. In this case you do not see a constant 1  
> retrace
> interval delay, but will instead see a variable delay between 0 and  
> retrace
> rate msec depending on when buffer_swap() was called.

I find this confusing.  To me that sounds like correct behaviour for  
a syncrhonous call. Sometimes it will return right away and sometimes  
it will be delayed up to one retrace in time.  It depends on when, in  
the retrace you called.  If you ask for one while one is pending then  
you have to wait the first interval plus another.

(note, I'm not suggesting its correct that it then takes another  
refresh for the swap to actually occur).

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: