Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread Dyweni - VirtualGL-Users
Neat-O! I am thrilled to have been able to contribute something useful back to an open source project! --- Thanks, Dyweni On 2013-06-05 19:36, DRC wrote: > I've checked in support for the swap control extensions to the > VirtualGL > subversion trunk. Notable differences in my implementation r

Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread DRC
I've checked in support for the swap control extensions to the VirtualGL subversion trunk. Notable differences in my implementation relative to yours: -- The swap interval is treated as a per-window attribute, per the spec, and stored in the pbwin instance corresponding to the drawable. -- glX

Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread Nathan Kidd
On 06/05/2013 09:14 AM, DRC wrote: > On 6/4/13 8:51 PM, Nathan Kidd wrote: >> Is there a reason for -fps to not automatically enable -sp? >> >> I'm not thinking of any use case for -fps apart from -sp; as you've >> said, in the typical use case of wanting to rate-limit your >> app/bandwidth you alw

Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread DRC
I will need to look at this in more detail. There are several things that the patch does incorrectly, from a VirtualGL coding standpoint, and it also needs to be modified to treat the swap interval as a per-drawable attribute in GLX_EXT_swap_control rather than a global attribute (treating it

Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread DRC
On 6/4/13 8:51 PM, Nathan Kidd wrote: > Is there a reason for -fps to not automatically enable -sp? > > I'm not thinking of any use case for -fps apart from -sp; as you've > said, in the typical use case of wanting to rate-limit your > app/bandwidth you always need -sp. Not true. VGL_FPS was orig

Re: [VirtualGL-Users] Support for VSync

2013-06-05 Thread DRC
It is in the docs: http://virtualgl.svn.sourceforge.net/viewvc/virtualgl/vgl/tags/2.3.2/doc/index.html#VGL_FPS "If frame spoiling is disabled, then setting VGL_FPS effectively limits the server’s 3D rendering frame rate as well." Further, I've been developing VirtualGL for 10 years, so generall

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Dyweni - VirtualGL-Users
There is only one reason I can think of for using -fps without -sp. The server I run on is at home, behind a cable modem with a 1Mbps upload cap and a hideous rate limiter courtesy of the ISP if I go over the cap. When I connect from friends houses to play, I find that I have to set -fps to so

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Dyweni - VirtualGL-Users
Sorry about causing undue frustration. It wasn't clear to me what exactly frame spoiling really did, at least not until you explained how it locked the 3D rendering rate to the value of the -fps option. I think if I had read about the link between the two options in the configuration docs, it

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Nathan Kidd
On 06/04/2013 06:27 PM, DRC wrote: > On 6/4/13 3:16 PM, Dyweni - VirtualGL-Users wrote: >> You are correct. Running vglrun with '-sp -fps 60' limits the 3D >> rendering rate as you described. The 3D rendering rate follows the -fps >> value. I didn't realize that -sp would lock the two rates toge

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread DRC
On 6/4/13 3:16 PM, Dyweni - VirtualGL-Users wrote: > You are correct. Running vglrun with '-sp -fps 60' limits the 3D > rendering rate as you described. The 3D rendering rate follows the -fps > value. I didn't realize that -sp would lock the two rates together. Despite the fact that I told you

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Dyweni - VirtualGL-Users
Here are the performance marks for the third patch: All tests are performed with VirtualGL's Emulated Monitor Refresh Rate at 60. The '-fps' and '-sp' switches were not used. (glxgears -interval n) INTERVAL FPS CPU 0 27250 100% 1 60 1% 2 30 1% 3

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Dyweni - VirtualGL-Users
Attached is the third version of the patch. This adds the following functionality to VirtualGL 2.3.2: - Advertise support for the GLX Swap Control extensions (GLX_EXT_swap_control, GLX_SGI_swap_control). - Modify glXQueryDrawable() to intercept the attributes 'GLX_SWAP_INTERVAL_EXT' and 'GL

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread Dyweni - VirtualGL-Users
Hi DRC, You are correct. Running vglrun with '-sp -fps 60' limits the 3D rendering rate as you described. The 3D rendering rate follows the -fps value. I didn't realize that -sp would lock the two rates together. I have another patch coming soon that implements GLX_SGI_swap_control / glXSwa

Re: [VirtualGL-Users] Support for VSync

2013-06-04 Thread DRC
Dyweni, I await your response on this before I proceed any further. I need to resolve the matter of whether you simply forgot to disable frame spoiling (which is what I suspect, since your previous messages made no mention of using the -sp switch to vglrun or setting VGL_SPOIL to 0) or whethe

Re: [VirtualGL-Users] Support for VSync

2013-06-03 Thread DRC
You have to disable frame spoiling in order for the -fps option to limit the actual 3D rendering rate: Did you pass 'sp' to vglrun? vglrun -sp -fps {f} {application} I am more keen on the idea of implementing GLX_EXT_swap_control as opposed to implementing a separate frame rate governor, and

Re: [VirtualGL-Users] Support for VSync

2013-06-03 Thread DRC
You have to disable frame spoiling in order for the -fps option to limit the actual 3D rendering rate: Did you pass 'sp' to vglrun? vglrun -sp -fps {f} {application} I am more keen on the idea of implementing GLX_EXT_swap_control as opposed to implementing a separate frame rate governor, and

Re: [VirtualGL-Users] Support for VSync

2013-06-03 Thread Dyweni - VirtualGL-Users
FYI I modified glxgears to allow me to pass an interval (0,1,2,3,4) to GLX_EXT_swap_control. That's the -interval flag you see. --- Thanks, Dyweni On 2013-06-03 16:52, Dyweni - VirtualGL-Users wrote: > Frame spoiling has no effect in my setup. (Maybe you can spot a > problem in my setup?) Her

Re: [VirtualGL-Users] Support for VSync

2013-06-03 Thread Dyweni - VirtualGL-Users
Frame spoiling has no effect in my setup. (Maybe you can spot a problem in my setup?) Here's how I have things configured: (Game) -> VirtualGL (1) -> TurboVNC Server (2) -> Wire (Ethernet/Cable Modem) -> TurboVNC Viewer (3) (1) Game is run in VirtualGL in order to limit the outgoing FPS tha

Re: [VirtualGL-Users] Support for VSync

2013-06-02 Thread DRC
But you didn't answer my question. Why can't you achieve the same effect by setting VGL_FPS and disabling frame spoiling? The reason why frame spoiling exists is to make 3D apps feel more "interactive." You can think of it like this: through a remote connection, the mouse and keyboard are probab

Re: [VirtualGL-Users] Support for VSync

2013-06-02 Thread Dyweni - VirtualGL-Users
Hi DRC, I use VirtualGL / TurboVNC to play multiple instances of the game EVE Online through a web interface. The web interfaces makes it real easy to "multi-box". The backend server (where the games all run) does all the heavy lifting and the lightweight client (netbook, laptop, etc) just d

Re: [VirtualGL-Users] Support for VSync

2013-06-02 Thread DRC
I am still unclear why the normal mechanism of setting VGL_FPS and disabling frame spoiling wouldn't work for you. Have you tried that? It's not that I'm opposed to this feature, but I also don't want to implement something that isn't actually necessary. Please make a case for why VGL_3DFPS solv

Re: [VirtualGL-Users] Support for VSync

2013-06-02 Thread Dyweni - VirtualGL-Users
Hi DRC/All, I have mucked around with the VirtualGL 2.3.2 code and have come up with a solution that seems to work well. I have to mention that the solution is rather rough around the edges. Some of the code / ideas were drawn from Mesa's GLXGEARS program (i.e. calculating and reporting the

Re: [VirtualGL-Users] Support for VSync

2012-07-26 Thread DRC
Since VirtualGL redirects the 3D rendering into offscreen buffers, there is no concept of VSync, because there is no monitor involved until the pixels are drawn on the client machine, and by that time, the 3D rendering is already done. In the current implementation, there is no way to limit the 3D

Re: [VirtualGL-Users] Support for VSync

2012-07-26 Thread Arthur Huillet
On 26.07.2012 19:56, Dyweni - VirtualGL-Users wrote: > Hi All, > > I'm wondering if VirgualGL has support for VSync? I know > that VirtualGL has support to output only x frames per second, but > that > is different from VSync. With VirtualGL you're not outputting anything to the screen. Therefore