[vlc] Trying to use AssignNVidiaAffinity to assign OpenGL a specific graphics card

David R Robison drrobison at openroadsconsulting.com
Tue Aug 13 22:24:42 CEST 2013


We have an application that uses two nvidia cards and four monitors. We 
are attempting to display 48 videos. However, when using vout=opengl it 
appears that all the OpenGL acceleration is being preformed by only one 
of the graphics adapters. I have been playing with the 
AssignNVidiaAffinity function to try and assign the OpenGL to one of the 
two graphics adapters. I have the following function that creates the 
affinity mask:

static void AssignNVidiaAffinity(vout_display_t *vd, UINT 
nVidiaAffinity, HGPUNV *GpuMask) {
     UINT GPUIdx = 0;
     HGPUNV hGPU;
     while(wglEnumGpusNV(GPUIdx, &hGPU)) {
         if (GPUIdx == nVidiaAffinity) GpuMask[0] = hGPU;
         GPUIdx++;
     }
}

To get it to link I have to define

#define GLEW_STATIC

Everything compiles, but when I try to run the program it crashes when 
executing the wglEnumGpusNV call.

Has anyone attempted this before? Any thoughts on what I may be doing 
wrong? We are running under Windows 7.
Thanks, David

-- 

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison at openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.




More information about the vlc mailing list