|
|
|
@ -519,6 +519,14 @@ PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC nwglMakeAssociatedContextCurrentAMD;
|
|
|
|
|
PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC nwglGetCurrentAssociatedContextAMD;
|
|
|
|
|
PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC nwglBlitContextFramebufferAMD;
|
|
|
|
|
|
|
|
|
|
// WGL_NV_gpu_affinity
|
|
|
|
|
//====================
|
|
|
|
|
PFNWGLENUMGPUSNVPROC nwglEnumGpusNV;
|
|
|
|
|
PFNWGLENUMGPUDEVICESNVPROC nwglEnumGpuDevicesNV;
|
|
|
|
|
PFNWGLCREATEAFFINITYDCNVPROC nwglCreateAffinityDCNV;
|
|
|
|
|
PFNWGLENUMGPUSFROMAFFINITYDCNVPROC nwglEnumGpusFromAffinityDCNV;
|
|
|
|
|
PFNWGLDELETEDCNVPROC nwglDeleteDCNV;
|
|
|
|
|
|
|
|
|
|
#elif defined(NL_OS_MAC)
|
|
|
|
|
#elif defined(NL_OS_UNIX)
|
|
|
|
|
|
|
|
|
@ -1846,7 +1854,23 @@ static bool setupWGLAMDGPUAssociation(const char *glext)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// *********************************
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
static bool setupWGLNVGPUAssociation(const char *glext)
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_OGL(setupWGLNVGPUAssociation);
|
|
|
|
|
CHECK_EXT("WGL_NV_gpu_affinity");
|
|
|
|
|
|
|
|
|
|
#if !defined(USE_OPENGLES) && defined(NL_OS_WINDOWS)
|
|
|
|
|
CHECK_ADDRESS(PFNWGLENUMGPUSNVPROC, wglEnumGpusNV);
|
|
|
|
|
CHECK_ADDRESS(PFNWGLENUMGPUDEVICESNVPROC, wglEnumGpuDevicesNV);
|
|
|
|
|
CHECK_ADDRESS(PFNWGLCREATEAFFINITYDCNVPROC, wglCreateAffinityDCNV);
|
|
|
|
|
CHECK_ADDRESS(PFNWGLENUMGPUSFROMAFFINITYDCNVPROC, wglEnumGpusFromAffinityDCNV);
|
|
|
|
|
CHECK_ADDRESS(PFNWGLDELETEDCNVPROC, wglDeleteDCNV);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool setupGLXEXTSwapControl(const char *glext)
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_OGL(setupGLXEXTSwapControl);
|
|
|
|
@ -1972,6 +1996,31 @@ bool registerWGlExtensions(CGlExtensions &ext, HDC hDC)
|
|
|
|
|
delete [] uGPUIDs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ext.WGLNVGPUAffinity = setupWGLNVGPUAssociation(glext);
|
|
|
|
|
|
|
|
|
|
if (ext.WGLNVGPUAffinity)
|
|
|
|
|
{
|
|
|
|
|
uint i = 0;
|
|
|
|
|
|
|
|
|
|
HGPUNV hGPU;
|
|
|
|
|
|
|
|
|
|
while(nwglEnumGpusNV(i, &hGPU))
|
|
|
|
|
{
|
|
|
|
|
uint j = 0;
|
|
|
|
|
|
|
|
|
|
PGPU_DEVICE lpGpuDevice = NULL;
|
|
|
|
|
|
|
|
|
|
while(nwglEnumGpuDevicesNV(hGPU, j, lpGpuDevice))
|
|
|
|
|
{
|
|
|
|
|
nlinfo("Device: %s - %s - flags: %u", lpGpuDevice->DeviceName, lpGpuDevice->DeviceString, lpGpuDevice->Flags);
|
|
|
|
|
|
|
|
|
|
++j;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
++i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
#elif defined(NL_OS_MAC)
|
|
|
|
|