OpenGL and multiple GPUs - General possibility

夙愿已清 提交于 2019-12-06 03:16:01

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/7540194/opengl-and-multiple-gpus-general-possibility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!