OpenGL和多个GPU-一般可能性 [英] OpenGL and multiple GPUs - General possibility

查看:272
本文介绍了OpenGL和多个GPU-一般可能性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,是否可以在多个GPU上同时运行多窗口OpenGL应用程序?更具体地说,假设我创建了一个包含两个窗口的应用程序,每个窗口彼此共享GL上下文.现在,如果我将其中一个窗口从显示器1(在GPU 1上运行)移动到显示器2(在GPU 2上运行),这是否真的有效?仅凭共享上下文就能达到目的吗?

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?

我的第一个猜测是不会.如果真的不是那么简单,有没有办法做到这一点?我还可以想象,这取决于两个GPU是否由相同的驱动程序控制(或者更糟糕的是,让该计算机具有ATI和nVidia卡,两者都支持不同的GL版本).

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?

顺便说一句,不幸的是,目前我没有一台具有多个GPU的机器,所以我会进行一些测试.

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.

推荐答案

简短答案:是的.

长答案: Windows/Mac OS X:窗口始终由一个GPU更新,并且可能将像素复制到另一个GPU.

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

Linux:如果关闭了Xinerama,则无法在屏幕(GPU)之间移动窗口.如果Xinerama处于打开状态,则iirc至少nVidia驱动程序会同时向这两个GPU发送GL命令,以便您可以移动它们.

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.

有一些方法可以通过编程方式控制GPU选择和GPU-GPU复制.更多信息此处.

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

这篇关于OpenGL和多个GPU-一般可能性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆