Using C how can I detect the currently installed discrete GPUs and if they are currently in CrossFireX or SLI. I am using windows 7 and openGL. I would like to discover this information so that in my game I can support Alternate Frame Rendering more efficiently.
You need to use specific extensions, for each vendor. For CrossFire, you would use WGL_AMD_gpu_association, and specifically wglGetGPUIDsAMD
and wglGetGPUInfoAMD
to get information about the different GPUs. For Nvidia SLI, you would use WGL_NV_gpu_affinity, and specifically wglEnumGpusNV
and wglEnumGpuDevicesNV
to get information about the different GPUs.
To actually utilize multi-gpu, you will also need to create your contexts with the functions within those two extensions as well.