I’m having a problem where I’ve been unable get any OpenGL application to take advantage of the second GPU on my system.
I have two Quadro FX 4800 cards, no SLI, Win7 x64 and, as far as I can tell, all the latest drivers. I somehow got it into my head that I could do the following: open a window entirely within a display attached to my secondary graphics adapter, create a context for that window, and then all subsequent OpenGL calls would be routed to that GPU, leaving the primary GPU largely untouched, and available for near-exclusive use by another process. (I understand that OSX works something like that.) This has not turned out to be the case.
I cannot get my app to run on the second GPU. I call CreateWindowEx() with parameters to open the window [and then keep it] entirely on one of these secondary monitors. No luck. I’ve tried disabling Windows Aero… still no luck.
I should mention that I’m using the RivaTuner monitor to determine which GPU is active at any given time, using the Voltage Regulator Current readout for each GPU.
The only partial success I’ve had is by using wglCreateAffinityDCNV() with a mask to permit activity only on the secondary GPU. Then, my app does seem to run [mostly] on the secondary GPU! (The primary is busy doing… something.) But I can no longer draw to the window because Affinity-DCs cannot be bound to a window. I think. This extension is NOT well-documented, and I have found no examples of its use. I’ve not looked at the source for Equalizer, as I suspect it’s just using affinity-DCs for rendering to FBOs, not to an actual window. Maybe it would still be useful?
The whole point of this exercise is to draw at 60fps to all 4 graphics outputs on the machine. As it is, I can create a single window that spans my 3840x2160 quad 1920x1080 desktop and get a solid 30 fps with VSync on. This would actually be fine for my application, except for one problem: Even though I see 30fps, OpenGL reports that it’s drawing 60fps. I’m calling SwapBuffers() 60 times per second, but only every-other frame is visible on screen. I can’t tell programmatically WHICH frames are visible, which means that later on, I’ll have trouble frame-syncing my application across machines.
Now, when I first execute my application in a window stretched across two monitors, both attached to the primary adapter, I get a smooth 60fps. Even with a window stretched across the two displays on the secondary adapter, I get a smooth 60 for a second or two before it falls to 30. (Currently, I’m just rendering a few rectangles, so it’s not that my scene is overly complex.) It would be acceptable to run two entirely separate instances of the application, one for each GPU… if I could be sure that the second instance would run on the second GPU, and I’m hoping: thus run at 60fps.
Anyway, anybody have any ideas? Hopefully there’s something simple that I’m overlooking, but I’ve searched around for days now to no avail.
Also - I’ve been holding off on posting about this issue anywhere because there seem to be so many different facets to the problem… Would I be more likely to get assistance by breaking down my problems into smaller posts?
Thanks for treading to the end. Any help would be REALLY appreciated!