Re: egl *_screen on ubuntu w/ NVIDIA w/o X

jegde jedge <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CAKMLkizNJkfrO3+VNi9bu0gbD8kWwjqtUG9rR8hHCCTtAes9Ug@mail.gmail.com>
                                   I am still missing something fundamental...

I have an nvC0 family NVD9 GF119 Quadro NVS 4200M graphics card on a
dell latitude e6520 laptop running  ubuntu 12.04

I can compile mesa for with:
./autogen.sh --prefix=$INSTALl --enable-egl --enable-gles1
--enable-gles2 --enable-gallium-egl --enable-gallium-gbm
--with-egl-platforms=drm,fbdev,x11 --enable-gbm --enable-shared-glapi
--with-gallium-drivers=nouveau,r300,r600,swras


WORKS> EGL_PLATFORM=x11 ~/mesa-demos/src/egl/opengl/eglgears_x11
WORKS> EGL_PLATFORM=fbdev ~/mesa-demos/src/egl/opengl/eglgears_screen

FAILS> EGL_PLATFORM=drm ~/mesa-demos/src/egl/opengl/eglgears_screen
(eglinfo has the same results as above)

Drilling down with the debugger the application fails to create a
screen/surface.

The gbm backend: gbm_gallium_drm.so is hardcoded in
~/mesa/src/gallium/state_trackers/egl/drm/native_drm.c:
setenv("GBM_BACKEND", "gbm_gallium_drm.so", 1);


NULL is returned from dd->create_screen in
~/mesa/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c ::
pipe_loader_drm_create_screen()
(I cant resolve dd->create_screen() yet since I cant get gdb to step
into it, must be a dlopen lib)

This causes ~/mesa/src/gallium/targets/gbm/gbm.c::gallium_screen_create()
to call pipe_loader_release() which seems to close the
/dev/dri/screen0 file descriptor



mesa-demos compiled against libgl1-mesa-dri-experimental in
usr/lib/i386-linux-gnu/mesa-egl
also has the same results as above. (sans fbdev)

Any pointers are appreciated, thanks for looking.




eglgears_screen output:
localhost:~/demos$ MESA_DEBUG=1 EGL_LOG_LEVEL=debug
LIBGL_DEBUG=verbose EGL_PLATFORM=drm src/egl/opengl/eglgears_screen
libEGL debug: Native platform type: drm (environment overwrite)
libEGL debug: EGL search path is /usr/lib/i386-linux-gnu/egl
libEGL debug: added /usr/lib/i386-linux-gnu/egl/egl_gallium.so to module array
libEGL debug: added egl_dri2 to module array
libEGL debug: added egl_glx to module array
libEGL debug: dlopen(/usr/lib/i386-linux-gnu/egl/egl_gallium.so)
libEGL info: use DRM for display (nil)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in
eglInitialize(no usable display)

libEGL info: use DRM for display (nil)
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in
eglInitialize(no usable display)

libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize

EGLUT: failed to initialize EGL display
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.