OpenGL 和多个 GPU - 一般可能性

发布于 2024-12-06 17:05:22 字数 397 浏览 1 评论 0原文

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

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

我将不胜感激关于这个主题的任何见解,纯粹是信息性的,因为在快速谷歌搜索后我找不到任何东西。有人知道可能性吗?

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云醉月微眠 2024-12-13 17:05:22

简短回答:是的。

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

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

有多种方法可以通过编程方式控制 GPU 选择和 GPU-GPU 复制。更多信息请参见此处

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文