public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] Add second DRI driver name (DRI2DriverVDPAU)
@ 2013-08-16 10:31 Ибрагимов Ринат
  2013-08-19 15:54 ` Rinat Ibragimov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ибрагимов Ринат @ 2013-08-16 10:31 UTC (permalink / raw)
  To: intel-gfx

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 <ibragimovrinat@mail.ru>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-29  7:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16 10:31 [PATCH] Add second DRI driver name (DRI2DriverVDPAU) Ибрагимов Ринат
2013-08-19 15:54 ` Rinat Ibragimov
2013-08-26  7:36 ` Rinat Ibragimov
2013-08-26 20:40 ` Eric Anholt
2013-08-26 21:22   ` Rinat Ibragimov
2013-08-26 23:22     ` Eric Anholt
2013-08-27  7:29       ` Rinat Ibragimov
2013-08-28 23:26         ` Eric Anholt
2013-08-29  7:49           ` Rinat Ibragimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox