Results 1 to 6 of 6

Thread: debugging into OpenGL Mesa driver

  1. #1
    Join Date
    Jun 2014
    Posts
    3

    Default debugging into OpenGL Mesa driver

    I am trying to step into mesa driver using gdb but i am not able to do that.
    I have added "CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3'" into configure file and ran "./configure --enable-debug" ; make; make install but no success.

    I have tried with command "./configure --enable-debug CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3" but no success. I am not sure if that command is correct for building in debug mode.

    Also, LIBGL_DEBUG=verbose glxgears gives output as:

    libGL: screen 0 does not appear to be DRI3 capable
    libGL: pci id for fd 4: 15ad:0405, driver vmwgfx
    libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/vmwgfx_dri.so
    libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/vmwgfx_dri.so
    libGL: driver does not expose __driDriverGetExtensions_vmwgfx(): /usr/lib/i386-linux-gnu/dri/vmwgfx_dri.so: undefined symbol: __driDriverGetExtensions_vmwgfx
    libGL: Can't open configuration file /root/.drirc: No such file or directory.
    libGL: Can't open configuration file /root/.drirc: No such file or directory.

    How can I find out which driver I have installed and it is taking correct libraries?

  2. #2
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    486

    Default

    http://www.mesa3d.org/vmware-guest.html

    Build Mesa and the vmwgfx_dri.so driver, the vmwgfx_drv.so xorg driver, the X acceleration library libxatracker. The vmwgfx_dri.so is used by the OpenGL libraries during direct rendering, and by the Xorg server during accelerated indirect GL rendering. The libxatracker library is used exclusively by the X server to do render, copy and video acceleration:
    The following configure options doesn't build the EGL system.
    As before, if you're on a 32-bit system, you should skip the --libdir configure option.
    Code:
      cd $TOP/mesa
      ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa --disable-dri3
      make
      sudo make install
    So for your setup which tries to load /usr/lib/i386-linux-gnu/dri/vmwgfx_dri.so:
    Code:
    CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3' ./autogen.sh --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --with-gallium-drivers=svga --with-dri-drivers= --enable-xa --disable-dri3

  3. #3
    Join Date
    Jun 2014
    Posts
    3

    Default

    thanks for reply.
    Now,
    Code:
    break _mesa_Clear
    Function "_mesa_Clear" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    
    Breakpoint 1 (_mesa_Clear) pending.
    (gdb) start
    Function "main" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    
    Temporary breakpoint 2 (main) pending.
    Starting program: /usr/bin/glxgears 
    /usr/bin/glxgears: symbol lookup error: /usr/lib/i386-linux-gnu/mesa/libGL.so.1: undefined symbol: _glapi_tls_Dispatch
    [Inferior 1 (process 14288) exited with code 0177]

  4. #4
    Join Date
    Jun 2010
    Location
    ฿ 16LDJ6Hrd1oN3nCoFL7BypHSEYL84ca1JR
    Posts
    1,044

    Default

    From what I have seen -Og still optimizes out some variable values. If you want to really see everything, use -O0.

    You can find out very verbosely what libraries are used when starting with
    LD_DEBUG=libs glxgears

    From this bugreport https://bugs.freedesktop.org/show_bug.cgi?id=73778 it seems you should append --enable-glx-tls to configure switches to make that glapi warning/error go away.

    Are you sure you want "start" and not "run"?

  5. #5
    Join Date
    Jun 2014
    Posts
    3

    Default

    Thanks, that issue got solved. But when I rebooted my ubutnu and after login, no desktop i can have terminal with alt+ctrl_f1 but how can i recover my desktop now

  6. #6
    Join Date
    Jul 2013
    Posts
    204

    Default

    Quote Originally Posted by rgc183 View Post
    Thanks, that issue got solved. But when I rebooted my ubutnu and after login, no desktop i can have terminal with alt+ctrl_f1 but how can i recover my desktop now
    Well that depends if you read my reply to you on the Mesa mailing list. To quote myself:
    Where are you installing it to?? You don't really want to blow away Ubuntu's drivers as you will have nothing to revert to if something goes wrong.
    If you did what I suggested you simply need to comment out the directories you added to your config files. If you didn't listen then you need to somehow reinstall the default Ubuntu mesa drivers. So where did you install too?

    You can see my post again here: http://lists.freedesktop.org/archive...ne/060781.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •