Bug 32825 - egl_glx driver completely broken in 7.9 branch [fix in master]
Summary: egl_glx driver completely broken in 7.9 branch [fix in master]
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 7.9
Hardware: All All
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 08:08 UTC by nobled
Modified: 2013-01-18 18:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description nobled 2011-01-04 08:08:55 UTC
As is, it fails to validate any config because it apparently doesn't convert things like GLX_NONE into EGL_NONE:

libEGL debug: added ../../../usr/lib/egl/egl_glx.so to module array
libEGL debug: added ../../../usr/lib/egl/egl_dri2.so to module array
libEGL debug: dlopen(../../../usr/lib/egl/egl_glx.so)
libEGL debug: attribute 0x3034 has an invalid value 0x8000
libEGL debug: GLX: failed to validate config 0
libEGL debug: attribute 0x3034 has an invalid value 0x8000
libEGL debug: GLX: failed to validate config 1
libEGL debug: attribute 0x3034 has an invalid value 0x8000
libEGL debug: GLX: failed to validate config 2
...
libEGL debug: attribute 0x3034 has an invalid value 0x8000
libEGL debug: GLX: failed to validate config 127
libEGL warning: GLX: failed to create any config
libEGL debug: dlopen(../../../usr/lib/egl/egl_dri2.so)
libEGL fatal: DRI2: failed to authenticate

(For reference, EGL_TRANSPARENT_TYPE = 0x3034, GLX_NONE = 0x8000, EGL_NONE = 0x3038)

It looks like the fix is to cherry-pick this commit to the 7.9 branch:

http://cgit.freedesktop.org/mesa/mesa/commit/?id=ecca5571b6df9a35dc16280b3556f4b11a8493a2
Comment 1 Chia-I Wu 2011-01-05 03:10:42 UTC
The fix has dependencies on other commits.  For 7.9 branch, I have to make a different one.  The new fix is much smaller and may be incomplete.  But at least EGL demos run.
Comment 2 nobled 2011-01-05 08:35:43 UTC
Still broken here, though. This time the error looks like this:

libEGL debug: attribute 0x3034 has an invalid value 0x3
libEGL debug: GLX: failed to validate config 0
libEGL debug: attribute 0x3034 has an invalid value 0x3
libEGL debug: GLX: failed to validate config 1
libEGL debug: attribute 0x3034 has an invalid value 0x4
libEGL debug: GLX: failed to validate config 2
libEGL debug: attribute 0x3034 has an invalid value 0x4
libEGL debug: GLX: failed to validate config 3
libEGL debug: attribute 0x3034 has an invalid value 0x3
libEGL debug: GLX: failed to validate config 4
...
libEGL debug: attribute 0x3034 has an invalid value 0x4
libEGL debug: GLX: failed to validate config 127
libEGL warning: GLX: failed to create any config
Comment 3 Chia-I Wu 2011-01-05 10:05:04 UTC
Did you try a clean build?  I don't see why the fix would make 0x3034 have the value 0x3 or 0x4.
Comment 4 nobled 2011-01-06 06:45:04 UTC
(In reply to comment #3)
> Did you try a clean build?  I don't see why the fix would make 0x3034 have the
> value 0x3 or 0x4.

Yeah, a fresh git checkout:
git checkout 7.9
git clean -xdf
autoreconf && ./configure --disable-glw --disable-glut --disable-glu --disable-gallium-i915 --disable-gallium-i965 --disable-gallium-radeon --disable-gallium-svga --enable-xcb
cd src/egl && make

I just needed to rebuild the egl_glx.so, so I just did that. That shouldn't make a difference, right?
Comment 5 Chia-I Wu 2011-01-06 06:54:49 UTC
You also need to rebuild libEGL (src/egl/main/).  Could you see if it helps?
Comment 6 nobled 2011-01-06 11:49:15 UTC
(In reply to comment #5)
> You also need to rebuild libEGL (src/egl/main/).  Could you see if it helps?

Nope, I tried that. Same error.
Comment 7 Chia-I Wu 2011-01-06 21:16:10 UTC
This fix is a WORKSFORME.  I am not sure, but it may be a compatibility issue with your libGL.  Could you set a breakpoint at _eglSetConfigKey and see when is 0x3034 set and to which value?
Comment 8 csd_b 2011-01-07 15:08:03 UTC
hi, 
I'm running a small test program against the egl-glx version with the fix mentioned below, and when I run the following piece of code:
----------------------------------------
static EGLint const attribute_list[] = {
        EGL_RED_SIZE, 1,
        EGL_GREEN_SIZE, 1,
        EGL_BLUE_SIZE, 1,
        EGL_NONE
};
...
        fprintf(stderr,"Calling eglChooseConfig\n");
        if (eglChooseConfig(egld, attribute_list, &config, 1, &num_config) == EGL_FALSE) {
                fprintf(stderr, "eglChooseConfig failed. err=%x\n", eglGetError());
                exit(1);
        } else {
                fprintf(stderr, "eglChooseConfig finished ok\n");
        }
-------------------------------------------

I get the following output:
--------------------------
Calling eglChooseConfig
libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria (0x1)
libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria (0x1)
libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria (0x1)
...[repeats about 100 times]...
eglChooseConfig finished ok
--------------------------

is this related to this bug?
Also, eglgears_screen and egltri_screen fail with this error:
-------------------------------------------------------
libEGL debug: attribute 0x3033 has an invalid value 0x8
libEGL debug: EGL user error 0x3004 (EGL_BAD_ATTRIBUTE) in eglChooseConfig
-------------------------------------------------------

but I never ran those before today so I don't know if they are supposed to work or not.

 thanks,
   csd
Comment 9 Chia-I Wu 2011-01-08 01:09:10 UTC
(In reply to comment #8)
> hi, 
> I'm running a small test program against the egl-glx version with the fix
> mentioned below, and when I run the following piece of code:
> ----------------------------------------
> static EGLint const attribute_list[] = {
>         EGL_RED_SIZE, 1,
>         EGL_GREEN_SIZE, 1,
>         EGL_BLUE_SIZE, 1,
>         EGL_NONE
> };
> ...
>         fprintf(stderr,"Calling eglChooseConfig\n");
>         if (eglChooseConfig(egld, attribute_list, &config, 1, &num_config) ==
> EGL_FALSE) {
>                 fprintf(stderr, "eglChooseConfig failed. err=%x\n",
> eglGetError());
>                 exit(1);
>         } else {
>                 fprintf(stderr, "eglChooseConfig finished ok\n");
>         }
> -------------------------------------------
> 
> I get the following output:
> --------------------------
> Calling eglChooseConfig
> libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria
> (0x1)
> libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria
> (0x1)
> libEGL debug: the value (0x8) of attribute 0x3040 did not meet the criteria
> (0x1)
> ...[repeats about 100 times]...
> eglChooseConfig finished ok
> --------------------------
> 
> is this related to this bug?
Nope.  You should specifiy EGL_RENDERABLE_TYPE (0x3040) in the test program.  It is default to EGL_OPENGL_ES1_BIT (0x1), and egl_glx only supports EGL_OPENGL_BIT (0x8).
> Also, eglgears_screen and egltri_screen fail with this error:
> -------------------------------------------------------
> libEGL debug: attribute 0x3033 has an invalid value 0x8
> libEGL debug: EGL user error 0x3004 (EGL_BAD_ATTRIBUTE) in eglChooseConfig
> -------------------------------------------------------
> 
> but I never ran those before today so I don't know if they are supposed to work
> or not.
Those suffixed with _screen do not work with egl_glx.  They requre EGL_MESA_screen_surface extension.  They should output better error message though.
>  thanks,
>    csd
Comment 10 Matt Turner 2013-01-18 18:49:09 UTC
7.9 branch is dead.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.