Bug 3316 - libGLwrapper don't filter video4linux devices while search appropriate GLX device
Summary: libGLwrapper don't filter video4linux devices while search appropriate GLX de...
Status: CLOSED WONTFIX
Alias: None
Product: Sisyphus
Classification: Development
Component: libGLwrapper (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Anton Farygin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-25 10:59 MSK by Alexey V. Novikov
Modified: 2005-12-24 01:16 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey V. Novikov 2003-11-25 10:59:49 MSK
libGLwrapper-5.0.1-alt7.
libGLwrapper don't filter video4linux devices while search appropriate GLX 
device. For example, AVerMedia tvtuner & NVidia GeForce 4 (and any other).
In this example libGLwrapper can't find NV in this string (string 84 from 
GLwrapper-0.1.8-nv_and_fglrx.patch) 

if (ainfo && strstr (ainfo[0].name, "NV")) 

because ainfo[0] -> video4linux.:(
Comment 1 Anton Farygin 2004-05-14 19:22:04 MSD
посмотрим.
Comment 2 Anton Farygin 2004-05-14 19:22:39 MSD
покажите мне пожалуйста xvinfo с этой машины
Comment 3 Alexey V. Novikov 2004-05-18 08:47:22 MSD
Вот слегка поскипанный:

X-Video Extension version 2.2
screen #0
  Adaptor #0: "video4linux"
    number of ports: 1
    port base: 139
    operations supported: PutVideo 
    supported visuals:
<skip>
    number of attributes: 11
<skip>
    number of encodings: 9
<skip>
  Adaptor #1: "NV17 Video Overlay"
    number of ports: 1
    port base: 140
    operations supported: PutImage 
    supported visuals:
<skip>
    number of attributes: 9
<skip>
    maximum XvImage size: 2046 x 2046
    Number of image formats: 4
<skip>
  Adaptor #2: "NV05 Video Blitter"
    number of ports: 32
    port base: 141
    operations supported: PutImage 
    supported visuals:
<skip>
    no port attributes defined
    maximum XvImage size: 2046 x 2046
    Number of image formats: 5
<skip>
  Adaptor #3: "NVIDIA Video Interface Port"
    number of ports: 1
    port base: 173
    operations supported: PutVideo 
    supported visuals:
<skip>
    number of attributes: 9
<skip>
    number of encodings: 2
<skip>

Как я говорил, первым идет tvtuner.
Для себя я решил проблему прикладыванием
небольшого патча (прикладывается после GLwrapper-0.1.8-nv_and_fglrx.patch):

diff -uNr Mesa-5.0.1.orig/GLwrapper-0.1.8/GLwrapper.c Mesa-5.0.1/GLwrapper-0.1.
8/GLwrapper.c
--- Mesa-5.0.1.orig/GLwrapper-0.1.8/GLwrapper.c	Sat Nov 29 17:09:46 2003
+++ Mesa-5.0.1/GLwrapper-0.1.8/GLwrapper.c	Sat Nov 29 19:11:50 2003
@@ -202,6 +202,7 @@
       int ignore;
       int version;
       struct display_dispatch *d;
+      unsigned int glx_adp_ind, glx_adp_fnd;
 
 
       /* get overridden libraries filename by environment variable */
@@ -231,18 +232,26 @@
 	  version = VendorRelease(dpy);
 	  if (version >= 4000) 
 	    {
-	      if (ainfo && strstr (ainfo[0].name, "NV")) 
-		{
-		  current_lib = xf4_nv_lib;
-		  alt_current_lib = NULL;
+	      glx_adp_ind = 0;
+	      glx_adp_fnd = 0;
+	      while(!glx_adp_fnd && glx_adp_ind < nadaptors)
+	        {
+	          if (ainfo && strstr (ainfo[glx_adp_ind].name, "NV")) 
+		    {
+		      current_lib = xf4_nv_lib;
+		      alt_current_lib = NULL;
+		      glx_adp_fnd = 1;
+		    } 
+	          else if (ainfo && strstr (ainfo[glx_adp_ind].name, "ATI") && 
+		           (ainfo[glx_adp_ind].base_id == 61) && !strstr 
(ainfo[glx_adp_ind].name, "mach"))
+		    {
+		      current_lib = xf4_fglrx_lib;
+		      alt_current_lib = NULL;
+		      glx_adp_fnd = 1;
+		    }
+		  glx_adp_ind++;    
 		} 
-	      else if (ainfo && strstr (ainfo[0].name, "ATI") && 
-		       (ainfo[0].base_id == 61) && !strstr (ainfo[0].name, "mach"))
-		{
-		  current_lib = xf4_fglrx_lib;
-		  alt_current_lib = NULL;
-		} 
-	      else 
+	      if(!glx_adp_fnd) 
 		{
 		  current_lib = xf4_glx_lib;
 		  alt_current_lib = alt_xf4_glx_lib;
Comment 4 Denis Ovsienko 2004-05-28 12:50:51 MSD
Возможно, из-за этого у меня дома рендеринг стал софтовым примерно после
установки тюнера. Проверю.
Comment 5 Denis Ovsienko 2004-05-29 19:13:51 MSD
Выбросил тюнер, не загружаю v4l в иксах. Рендеринг по-прежнему софтовый, так что
v4l в моём случае не при чём.
Comment 6 Alexey V. Novikov 2004-11-18 13:59:23 MSK
libGLwrapper-5.0.2-alt2, система Alt Linux 2.4 Master DVD Edition
все то же самое.:(
попрежнему нет 3D при наличии v4l.:(
Comment 7 Anton Farygin 2005-06-20 19:03:48 MSD
в Sisyphus больше не используется libGLwrapper, эта подсистема переписана.