diff options
author | Rinat <ibragimovrinat@mail.ru> | 2014-01-17 10:47:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-17 10:54:21 +0000 |
commit | f23ab963c4f4ada2051588dfc85264aa2798dbf7 (patch) | |
tree | a0e56a78049d41308d1723a6c00b009ac757763e /src/sna/sna_dri.c | |
parent | 5f3ee21a307a4ff4db189bd53e58a70ec01ee6bc (diff) |
Provide DRI2DriverVDPAU for future compatibility
Since 2010, DRI2 supports multiple driver names. That was added to ease
selection of appropriate driver by libvdpau. As for today, intel driver
support only DRI2DriverDRI (== 0), but not DRI2DriverVDPAU (== 1).
Although there is no any hardware-specific VDPAU driver for intel video
adapters at the moment, it would be easier to use generic drivers like
libvdpau-va-gl by creating symlink named libvdpau_i965.so.1. That way
appropriate driver will be selected in run time automatically:
libvdpau_i965.so.1 on i965 equipped machines, and libvdpau_nvidia.so.1
on nvidia equipped ones.
[ickle: Whilst I think this is a workaround for a brainfart in libvdpau
that it defaults to libvdpau_nvidia.so rather than first to
libdvpau_${DRI2DriverDRI} and then to a hardcoded libvdpau_backend.so,
I have no better solution, and this does seem in accordance with the
spec.]
Signed-off-by: Rinat <ibragimovrinat@mail.ru>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73507
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r-- | src/sna/sna_dri.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index fedf2632..ba705ecd 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -2463,7 +2463,7 @@ bool sna_dri_open(struct sna *sna, ScreenPtr screen) DRI2InfoRec info; int major = 1, minor = 0; #if DRI2INFOREC_VERSION >= 4 - const char *driverNames[1]; + const char *driverNames[2]; #endif DBG(("%s()\n", __FUNCTION__)); @@ -2507,9 +2507,10 @@ bool sna_dri_open(struct sna *sna, ScreenPtr screen) info.ScheduleSwap = sna_dri_schedule_swap; info.GetMSC = sna_dri_get_msc; info.ScheduleWaitMSC = sna_dri_schedule_wait_msc; - info.numDrivers = 1; + info.numDrivers = 2; info.driverNames = driverNames; driverNames[0] = info.driverName; + driverNames[1] = info.driverName; #endif #if DRI2INFOREC_VERSION >= 6 |