[vlc-devel] [PATCH] nVidia affinity

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

On 29 Aug, David R Robison wrote :
> The reason for specifying nVidia each time is because these are nVidia 
> specific OpenGL extensions. There are also extensions for other card 

There are other extensions too.
For ATI (until they die)
Intel is hopeless for now.

> explanation. Any thoughts on how you want to handle this?

Make it generic. It will only work with cards who have the NV extensions
for now. Then, for people with the ATI extensions, when it gets
People with hybrid setup can modify their code themselves.

> To get the OpenGL function pointers you have to have an active OpenGL 
> context. However, you have to call the affinity routines outside an 
> OpenGL context. So I create a "dummy" context and fetch the function 
> pointers and then throw away the dummy context. I was hoping to cache 
> these function pointer so I did not have to fetch them each time I 
> needed them by creating another OpenGL context. They are used in the 
> open and the close functions. I could either 1) fetch them each time 
> they are needed or 2) attach them to some structure like vd->sys. Which 
> would you prefer.


> For the debug messages, I wanted some way to positively tell the user if 
> the GPU selection was successful or failed because the nVidia affinity 
> extensions did not exist. Without this there is no real way to know if 
> the selection worked. However I set them to debug so they would normally 
> be silent. Also, they would only be displayed if the user actually 
> selected a GPU affinity. But I can remove them if you wish.

Yes, but the messages should be shown only if the affinity option is not
the default one (aka auto).

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

More information about the vlc-devel mailing list