On 29. Jan 2013, at 17:07, Brice Goglin <Brice.Goglin_at_[hidden]> wrote:
> The current plan is to have some OpenCL device info and some OpenGL
> device info appear inside GPU PCI devices. That said, I am still not
> confident about the current OpenGL thing. The current branch manipulates
> what I usually call a display (":0.0") which seem rather X than OpenGL
> related, but I am not familiar with all this at all anyway.
For OpenGL applications on Linux this is the only way how they can identify a single GPU device. Typically the X server is set up such that a screen maps to a device, and the NVCTRL extension provides us with the mapping from X screen to PCI id -- and glX is the GL / X11 glue.
One can access multiple GPU devices through a single X Display* connection (":0") by selecting different screens (with "1" being the DefaultScreen( display ) for ":0.1").
One might also configure a separate X server for each device with a single screen, or any combination of server (port) / device (screen) mapping.
On Windows it's even more complicated, see http://www.equalizergraphics.com/documentation/parallelOpenGLFAQ.html.
> Since both OpenCL and OpenCL (and maybe CUDA at some point) may end up
> containing attributes describing the capabilities of the (same) GPU,
> we'll need to think about displaying them only once in a common place,
> but we're not there yet.
At least on CUDA, the device number has no direct mapping to the X11/glX entities other than the indirect mapping through the PCI id, where hwloc seems to be heading.