Trying to use wglCreateAffinityDCNV to select graphics card

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
kc7bfi
Blank Cone
Blank Cone
Posts: 10
Joined: 23 Apr 2013 22:33

Trying to use wglCreateAffinityDCNV to select graphics card

Postby kc7bfi » 15 Aug 2013 15:28

We have the case where we have one desktop with two nVidia cards and four monitors where we are trying to play 48 vlc video windows. It appears that when using vout=opengl, that only the first graphics card is used for acceleration. I have been trying to write a patch to allow a custom vlc command line argument to specify the graphics card to use, such as

Code: Select all

--nvidia-affinity=1
I have been playing with the following code

Code: Select all

int nVidiaAffinity = var_InheritInteger(vd, "nvidia-affinity"); if (nVidiaAffinity >= 0) { HGPUNV GpuMask[2]; HGPUNV hGPU; GpuMask[0] = NULL; GpuMask[1] = NULL; if (wglEnumGpusNV(nVidiaAffinity , &hGPU)) { GpuMask[0] = hGPU; sys->hGLDC = wglCreateAffinityDCNV(GpuMask); } }
Everything compiles but when I go to run, the wgl extension function pointers are all NULL.

Any thoughts on what I may be doing wrong? Any one interested in looking at this development? We might be willing to pay for this feature to be developed and contributed back to vlc.
Thanks, David

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Trying to use wglCreateAffinityDCNV to select graphics c

Postby Jean-Baptiste Kempf » 15 Aug 2013 16:09

Are you sure you shouldn't get those wglEnumGpusNV with vlc_gl_GetProcAddress ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

kc7bfi
Blank Cone
Blank Cone
Posts: 10
Joined: 23 Apr 2013 22:33

Re: Trying to use wglCreateAffinityDCNV to select graphics c

Postby kc7bfi » 15 Aug 2013 18:07

According to wglew.h and glwin32.c the function call to find the procedure pointers is

Code: Select all

wglGetProcAddress
Is this correct?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Trying to use wglCreateAffinityDCNV to select graphics c

Postby Jean-Baptiste Kempf » 15 Aug 2013 18:41

No. Use the vlc one.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 15 guests