i-rinat / libvdpau-va-gl

VDPAU driver with OpenGL/VAAPI backend
MIT License
161 stars 26 forks source link

figure out a way to enable this by default #23

Closed tchollingsworth closed 10 years ago

tchollingsworth commented 10 years ago

During the RPMFusion review for libvdpau-va-gl we discussed ways to enable this by default for people who have the hardware. We'd like to move that discussion upstream.

Doing it in the intel driver seems to have been rejected, and you seemed to think patching vdpau wouldn't fly either. Is there another way this could be done properly?

Alternatively, maybe an /etc/profile.d hack to set VDPAU_DRIVER could be considered in the interim? Is there a decent way to detect if compatible hardware is in use other than checking if the kernel module is loaded?

Also Nicolas mentioned optimus hardware as a potential issue also. If we decided to hack the environment variable in we'd probably want to see about patching optirun to drop it as well.

Thanks for any suggestions!

i-rinat commented 10 years ago

Is there another way this could be done properly?

The only proper way I see is to patch intel driver for second DRI2 name. All other solutions are fragile. If you add VDPAU_DRIVER to environment for all users, it will break VDPAU for all non-intel users (if some of them decides to install the package).

There is another possible solution comes to mind. One can create proxy VDPAU driver (which will be loaded on any hardware by setting VDPAU_DRIVER) and implement selection logic there. :-)

optimus hardware

I don't have optimus hardware, but I heard that optirun does nothing to pass VDPAU calls. Maybe that was about primus, I'm not sure.

i-rinat commented 10 years ago

and you seemed to think patching vdpau wouldn't fly either

I've though it's worth to try anyway, so I've sent patch to VDPAU mailing list.

i-rinat commented 10 years ago

https://bugs.freedesktop.org/show_bug.cgi?id=73507

i-rinat commented 10 years ago

https://bugs.freedesktop.org/show_bug.cgi?id=73507

Patch was accepted by upstream: http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=f23ab963c4f4ada2051588dfc85264aa2798dbf7