OpenGL多GPU支持 [英] OpenGL multi-GPU support

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

问题描述

当我们在PC上创建OpenGL上下文时,是否可以选择使用哪个物理设备或使用多少个设备?最新的OpenGL(4.5)API是否支持多GPU架构?如果我有两张相同的图形卡(例如,两张Nvidia GeForce卡),如何正确编程OpenGL API,以便从我有两张卡的事实中受益?如何以最小的努力将OpenGL程序从单个GPU版本转移到多GPU版本?

When we create the OpenGL context on PC, is there any way to choose which physical device or how many devices are used? Do the latest OpenGL (4.5) APIs support multi-GPU architecture? If I have two identical graphics cards (for example, two Nvidia GeForce cards), how do I properly program the OpenGL APIs in order to get benefits from the fact that I have two cards? How do I transfer the OpenGL program from a single GPU version to a multi-GPU version with minimal efforts?

推荐答案

OpenGL驱动程序公开了多个GPU(在Crossfire/SLI配置中),就好像它们是单个 GPU.在幕后,驱动程序将(理论上)弄清楚如何在两个GPU之间高效地分配渲染调用.这样做有几种方法,您可以零控制驾驶员选择哪种机制.

OpenGL drivers expose multiple GPUs (in Crossfire/SLI configurations) as if they were a single GPU. Behind the scenes, the driver will (theoretically) figure out how to dispatch rendering calls efficiently between the two GPUs. There are several methods for doing so, and you have zero control over which mechanism a driver picks.

如果您想更直接地控制哪个GPU与哪个GL上下文相关联,则必须使用特定于供应商的扩展. AMD具有 WGL_AMD_gpu_association ,而NVIDIA具有

If you want more direct control over which GPU is associated with which GL context, you have to use vendor-specific extensions. AMD has WGL_AMD_gpu_association, while NVIDIA has WGL_NV_gpu_affinity.

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

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