From 995120317d2337e4feb3b122a3e711d1421b6113 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2016 19:34:43 +0200 Subject: [PATCH] Fixed: Usage of wglEnumGpuDevicesNV --HG-- branch : develop --- .../driver/opengl/driver_opengl_extension.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index d9850a039..9fbee7518 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1991,24 +1991,29 @@ bool registerWGlExtensions(CGlExtensions &ext, HDC hDC) if (ext.WGLNVGPUAffinity) { - uint i = 0; + uint gpuIndex = 0; HGPUNV hGPU; - while(nwglEnumGpusNV(i, &hGPU)) + // list all GPUs + while (nwglEnumGpusNV(gpuIndex, &hGPU)) { uint j = 0; - PGPU_DEVICE lpGpuDevice = NULL; + _GPU_DEVICE gpuDevice; + gpuDevice.cb = sizeof(gpuDevice); - while(nwglEnumGpuDevicesNV(hGPU, j, lpGpuDevice)) + // list all devices connected to GPU + while(nwglEnumGpuDevicesNV(hGPU, j, &gpuDevice)) { - nlinfo("Device: %s - %s - flags: %u", lpGpuDevice->DeviceName, lpGpuDevice->DeviceString, lpGpuDevice->Flags); + nlinfo("Device: %s - %s - flags: %u - rect: (%u,%u)-(%u,%u)", gpuDevice.DeviceName, gpuDevice.DeviceString, (uint)gpuDevice.Flags, + (uint)gpuDevice.rcVirtualScreen.left, (uint)gpuDevice.rcVirtualScreen.top, + (uint)gpuDevice.rcVirtualScreen.right, (uint)gpuDevice.rcVirtualScreen.bottom); ++j; } - ++i; + ++gpuIndex; } }