From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?0JjQsdGA0LDQs9C40LzQvtCyINCg0LjQvdCw0YI=?= Subject: =?utf-8?q?=5BPATCH=5D_Add_second_DRI_driver_name_=28D?= =?utf-8?q?RI2DriverVDPAU=29?= Date: Fri, 16 Aug 2013 14:31:13 +0400 Message-ID: <1376649073.392605286@f12.i.mail.ru> Reply-To: =?UTF-8?B?0JjQsdGA0LDQs9C40LzQvtCyINCg0LjQvdCw0YI=?= Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fallback2.mail.ru (fallback2.mail.ru [94.100.176.87]) by gabe.freedesktop.org (Postfix) with ESMTP id C2066E5DB9 for ; Fri, 16 Aug 2013 04:07:22 -0700 (PDT) Received: from f12.i.mail.ru (f12.i.mail.ru [128.140.171.222]) by fallback2.mail.ru (mPOP.Fallback_MX) with ESMTP id E5E22E8880FA for ; Fri, 16 Aug 2013 14:31:15 +0400 (MSK) Received: from mail by f12.i.mail.ru with local (envelope-from ) id 1VAHJJ-0000qv-Eo for intel-gfx@lists.freedesktop.org; Fri, 16 Aug 2013 14:31:13 +0400 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org libvdpau uses second DRI driver name to determine which VDPAU driver to use. This patch will allow libvdpau choose libvdpau_i965.so on systems with Intel GPUs, libvdpau_nvidia.so on those with nVidia ones, and so on. I'm experimenting now with generic vdpau driver using OpenGL/VA-API, it would be convenient to have this driver selection working without manual driver selection. Signed-off-by: Rinat --- src/sna/sna_dri.c | 5 +++-- src/uxa/intel_dri.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 1569251..0ba373d 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -2299,7 +2299,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__)); @@ -2336,9 +2336,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 diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index 0370034..2d33380 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -1553,7 +1553,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) int dri2_major = 1; int dri2_minor = 0; #if DRI2INFOREC_VERSION >= 4 - const char *driverNames[1]; + const char *driverNames[2]; #endif if (intel->force_fallback) { @@ -1620,9 +1620,10 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) info.ScheduleSwap = I830DRI2ScheduleSwap; info.GetMSC = I830DRI2GetMSC; info.ScheduleWaitMSC = I830DRI2ScheduleWaitMSC; - info.numDrivers = 1; + info.numDrivers = 2; info.driverNames = driverNames; driverNames[0] = info.driverName; + driverNames[1] = info.driverName; #endif return DRI2ScreenInit(screen, &info); -- 1.7.10.4