5

I was wondering, is it possible to run a multi-window OpenGL application on more than one GPU simultaneously? To be more specific, let's say I've created an application with two windows each sharing it's GL context between each other. Now if I'd move one of those windows from display 1 (running on GPU 1) to display 2 (running on GPU 2), would this actually work? Would sharing contexts alone do the trick?

My first guess would be no. And if this is really not that simple, is there a way to accomplish this? I could also imagine that it depends on whether the two GPUs are controlled by the same driver or not (or even worse, let the machine have an ATI as well as an nVidia card, both supporting different GL versions).

I would appreciate any insights on this topic, purely informational since I can't find anything after quick googling. Does anyone know the possibilities?

EDIT: By the way, unfortunately I don't have a machine with multiple GPUs available at the moment, so I would test around a little bit.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
PuerNoctis
  • 1,264
  • 14
  • 31

1 Answers1

6

Short Answer: yes.

Long Answer: Windows/Mac OS X: The windows are always updated by one GPU, and possibly the pixels are copied to another GPU.

Linux: If Xinerama is off, you can't move the window between screens (GPUs). If Xinerama is on, iirc at least the nVidia drivers send GL commands to both GPUs simultaneously so you can move them.

There are ways to control GPU selection and GPU-GPU copies programmatically. More information here.

genpfault
  • 47,669
  • 9
  • 68
  • 119
eile
  • 1,085
  • 6
  • 18
  • 1
    Thanks for the answer! The FAQ answered a lot of my questions. And my thought on context sharing actually seems to be a wrong one. According to the FAQ, contexts can't be shared accross several pipe lines, and are therefore not available on the other GPU. – PuerNoctis Sep 25 '11 at 11:37
  • 1
    You are right, with the exception of OS X. If you're on OS X I highly recommend the Multi-GPU talk from last WWDC. – eile Sep 26 '11 at 06:51