[vlc-devel] [PATCH] nVidia affinity

Jean-Baptiste Kempf jb at videolan.org
Thu Aug 29 13:06:22 CEST 2013


On 28 Aug, David R Robison wrote :
>   modules/video_output/Modules.am    |    2 +-
>   modules/video_output/msw/common.h  |    3 ++
>   modules/video_output/msw/glwin32.c |   87 
> +++++++++++++++++++++++++++++++++++-
>   po/nb.po                           |    2 +-
>   po/or.po                           |    2 +-
>   5 files changed, 91 insertions(+), 5 deletions(-)

No .po changes in this patch.

> +    // nVidia GPU affinity
> +    HDC affinityHDC

"GPU affinity" is enough and can be done inline.


> +#define GLEW_NO_GLU
> +#define GLEW_STATIC

Where is the include?

> +#define HW_NVIDIA_AFFINITY_TEXT N_("nVidia affinity of adapter")
> +#define HW_NVIDIA_AFFINITY_LONGTEXT N_(\
> +    "nVidia affinity of adapter indexed from 0.")

No. Remove nVidia from there. It will get implemented at some point with
ATI and we do not want to ask translators to redo it.

> +    add_integer("nvidia-affinity", -1, HW_NVIDIA_AFFINITY_TEXT, 
> HW_NVIDIA_AFFINITY_LONGTEXT, true)

idem --gpu-affinity

> +#undef wglEnumGpusNV
> +#undef wglCreateAffinityDCNV
> +#undef wglDeleteDCNV
> +static PFNWGLENUMGPUSNVPROC wglEnumGpusNV;
> +static PFNWGLCREATEAFFINITYDCNVPROC wglCreateAffinityDCNV;
> +static PFNWGLDELETEDCNVPROC wglDeleteDCNV;

Why?

> +static void AssignNVidiaAffinity(vout_display_t *vd, UINT nVidiaAffinity) {

Here, this is fine to call it nVidia.

> +    /* see if we have the extensions */
> +    if (!wglEnumGpusNV || !wglCreateAffinityDCNV) {
> +        msg_Dbg(vd, "OpenGL nVidia extensions do not seem to be present" );
> +        return;
> +    }

You are going to spam the messages for all GPU not-nVidia and the old
nVidia ones? Why not doing it only if requested?

> +    /* process card specific affinities */
> +    int nVidiaAffinity = var_InheritInteger(vd, "nvidia-affinity");
> +    if (nVidiaAffinity >= 0) {
> +        msg_Dbg(vd, "nVidia affinity using adapter %d", nVidiaAffinity );
> +        AssignNVidiaAffinity(vd, nVidiaAffinity);
> +    }

See above.

Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list