Bug#622299: Corrupt GL rendering with KMS (r300) enabled on IA-64 platform (Itanium)
Hello Michel,
> If you pass --with-dri-drivers=r300 to configure, the classic driver
> should end up in lib/r300_dri.so, as opposed to r300g in
> lib/gallium/r300_dri.so . You can override libGL's search path with the
> LIBGL_DRIVERS_PATH environment variable, and if you also set
> LIBGL_DEBUG=verbose, it prints on stderr where it loads the driver from.
So, something isn't working as expected. If I follow the "How to build
mesa page" (http://pkg-xorg.alioth.debian.org/howto/build-mesa.html),
there's no r300 classic driver, but classic radeon driver (as can be
read in the "Preparing mesa sources" section: "For r300 (the options
are named radeon), you need:"). So, with:
emeric@longspeak:~/mesa.git$ ./configure \
--enable-driglx-direct \
--enable-gallium \
--enable-gles-overlay \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-driver=dri \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
--with-state-trackers=egl,glx,dri,vega \
--with-dri-drivers=radeon --enable-gallium-radeon
both the classic and Gallium drivers are built, as emphasized by the
configure output:
prefix: /usr/local
exec_prefix: ${prefix}
libdir: ${exec_prefix}/lib
includedir: ${prefix}/include
OpenGL: yes (ES1: yes ES2: yes)
OpenVG: yes
Driver: dri
OSMesa: no
DRI drivers: radeon
DRI driver dir: /usr/lib/dri
Use XCB: no
Shared dricore: no
GLU: yes
GLw: yes (Motif: no)
glut: yes
EGL: yes
EGL platforms: drm x11
EGL drivers: builtin:egl_glx builtin:egl_dri2 egl_gallium
EGL Gallium STs: $(GL_LIB) $(VG_LIB)
llvm: no
Gallium: yes
Gallium dirs: auxiliary drivers state_trackers
Target dirs: egl dri-r300 dri-swrast
Winsys dirs: sw sw/xlib sw/dri i915/sw radeon/drm
Driver dirs: softpipe failover galahad trace rbug noop
identity svga i915 i965 r300
Trackers dirs: egl glx dri vega
Shared libs: yes
Static libs: no
And indeed, I'm getting both the classic radeon_dri.so driver and
Gallium r300_dri.so driver, right?
emeric@longspeak:~/mesa.git$ ls lib/
egl libGLESv1_CM.so.1.1.0 libglut.so
gallium libGLESv2.so libglut.so.3
libEGL.so libGLESv2.so.2 libglut.so.3.7.1
libEGL.so.1 libGLESv2.so.2.0.0 libGLw.so
libEGL.so.1.0 libGL.so libGLw.so.1
libglapi.so libGL.so.1 libGLw.so.1.0.0
libglapi.so.0 libGL.so.1.2 libOpenVG.so
libglapi.so.0.0.0 libGLU.so libOpenVG.so.1
libGLESv1_CM.so libGLU.so.1 libOpenVG.so.1.0.0
libGLESv1_CM.so.1 libGLU.so.1.3.071100 radeon_dri.so
emeric@longspeak:~/mesa.git$ ls lib/gallium/
r300_dri.so swrastg_dri.so
>From what I understand, since I passed --enable-gallium-radeon, the
Gallium driver will be used by default.
So, still following the "How to build mesa" page:
emeric@longspeak:~/mesa.git$ mv lib/gallium/* lib/
emeric@longspeak:~/mesa.git$ export LIBGL_DRIVERS_PATH=lib
emeric@longspeak:~/mesa.git$ LIBGL_DEBUG=verbose glxinfo 2>&1
>/dev/null | grep so$
libGL: OpenDriver: trying lib/tls/r300_dri.so
libGL: OpenDriver: trying lib/r300_dri.so
libGL: OpenDriver: trying lib/tls/r300_dri.so
libGL: OpenDriver: trying lib/r300_dri.so
(don't know why I'm getting twice the output)
And glxinfo is rendering through the newly built Gallium driver:
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI R300
OpenGL version string: 2.1 Mesa 7.11-devel (git-6a35cbb)
Now, trying to swith back to the classic driver:
emeric@longspeak:~/mesa.git$ ./configure \
--enable-driglx-direct \
--enable-gallium \
--enable-gles-overlay \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-driver=dri \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
--with-state-trackers=egl,glx,dri,vega \
--with-dri-drivers=radeon
(removed --enable-gallium-radeon from the passed options).
Gallium is nevertheless built as can be seen in the configure output:
prefix: /usr/local
exec_prefix: ${prefix}
libdir: ${exec_prefix}/lib
includedir: ${prefix}/include
OpenGL: yes (ES1: yes ES2: yes)
OpenVG: yes
Driver: dri
OSMesa: no
DRI drivers: radeon
DRI driver dir: /usr/lib/dri
Use XCB: no
Shared dricore: no
GLU: yes
GLw: yes (Motif: no)
glut: yes
EGL: yes
EGL platforms: drm x11
EGL drivers: builtin:egl_glx builtin:egl_dri2 egl_gallium
EGL Gallium STs: $(GL_LIB) $(VG_LIB)
llvm: no
Gallium: yes
Gallium dirs: auxiliary drivers state_trackers
Target dirs: egl dri-r300 dri-swrast
Winsys dirs: sw sw/xlib sw/dri i915/sw radeon/drm
Driver dirs: softpipe failover galahad trace rbug noop
identity svga i915 i965 r300
Trackers dirs: egl glx dri vega
Shared libs: yes
Static libs: no
I'm still getting both the classic radeon_dri.so and r300_dri.so
Gallium drivers:
emeric@longspeak:~/mesa.git$ ls lib
egl libGLESv1_CM.so.1.1.0 libglut.so
gallium libGLESv2.so libglut.so.3
libEGL.so libGLESv2.so.2 libglut.so.3.7.1
libEGL.so.1 libGLESv2.so.2.0.0 libGLw.so
libEGL.so.1.0 libGL.so libGLw.so.1
libglapi.so libGL.so.1 libGLw.so.1.0.0
libglapi.so.0 libGL.so.1.2 libOpenVG.so
libglapi.so.0.0.0 libGLU.so libOpenVG.so.1
libGLESv1_CM.so libGLU.so.1 libOpenVG.so.1.0.0
libGLESv1_CM.so.1 libGLU.so.1.3.071100 radeon_dri.so
emeric@longspeak:~/mesa.git$ ls lib/gallium/
r300_dri.so swrastg_dri.so
But since I didn't pass --enable-gallium-radeon to configure, I'm
expecting GL rendering being performed through the classic driver. So
I didn't move the files from lib/gallium to lib. I'm thus getting the
following error:
emeric@longspeak:~/mesa.git$ LIBGL_DEBUG=verbose glxinfo 2>&1
>/dev/null | grep so$
libGL: OpenDriver: trying lib/tls/r300_dri.so
libGL: OpenDriver: trying lib/r300_dri.so
libGL error: unable to load driver: r300_dri.so
libGL: OpenDriver: trying lib/tls/swrast_dri.so
libGL: OpenDriver: trying lib/swrast_dri.so
libGL error: unable to load driver: swrast_dri.so
libGL: OpenDriver: trying lib/tls/swrastg_dri.so
libGL: OpenDriver: trying lib/swrastg_dri.so
libGL error: unable to load driver: swrastg_dri.so
And the glxinfo output reveals that GL rendering is still performed by
the Gallium driver, but the system one, not the newly built one
(although the library paths are all relative to lib/ as can be checked
in the above output!):
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI R300
OpenGL version string: 1.4 (2.1 Mesa 7.10)
If I'm moving the files from lib/gallium to gallium, the problem is fixed:
emeric@longspeak:~/mesa.git$ LIBGL_DEBUG=verbose glxinfo 2>&1
>/dev/null | grep so$
libGL: OpenDriver: trying lib/tls/r300_dri.so
libGL: OpenDriver: trying lib/r300_dri.so
But GL rendering is still performed by the Gallium driver (the newly
built this time):
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI R300
OpenGL version string: 2.1 Mesa 7.11-devel (git-6a35cbb)
So, even if I've removed --enable-gallium-radeon from the configure
option, it seems that the Gallium driver is still used by default.
Also removing --enable-gallium from the options didn't help either:
emeric@longspeak:~/mesa.git$ autoreconf -vfi
emeric@longspeak:~/mesa.git$ ./configure \
--enable-driglx-direct \
--enable-gles-overlay \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-driver=dri \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
--with-state-trackers=egl,glx,dri,vega \
--with-dri-drivers=radeon
(removed --enable-gallium and --enable-gallium-radeon options)
The configure output still shows that Gallium is built and I'm later
getting the exact same problem as without --enable-gallium-radeon
only:
prefix: /usr/local
exec_prefix: ${prefix}
libdir: ${exec_prefix}/lib
includedir: ${prefix}/include
OpenGL: yes (ES1: yes ES2: yes)
OpenVG: yes
Driver: dri
OSMesa: no
DRI drivers: radeon
DRI driver dir: /usr/lib/dri
Use XCB: no
Shared dricore: no
GLU: yes
GLw: yes (Motif: no)
glut: yes
EGL: yes
EGL platforms: drm x11
EGL drivers: builtin:egl_glx builtin:egl_dri2 egl_gallium
EGL Gallium STs: $(GL_LIB) $(VG_LIB)
llvm: no
Gallium: yes
Gallium dirs: auxiliary drivers state_trackers
Target dirs: egl dri-r300 dri-swrast
Winsys dirs: sw sw/xlib sw/dri i915/sw radeon/drm
Driver dirs: softpipe failover galahad trace rbug noop
identity svga i915 i965 r300
Trackers dirs: egl glx dri vega
Shared libs: yes
Static libs: no
The only way I'm succeeding in disabling Gallium is invoking configure
with --disable-gallium option, but I'm getting an error about OpenVG:
emeric@longspeak:~/mesa.git$ ./configure \
--enable-driglx-direct \
--disable-gallium \
--enable-gles-overlay \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-driver=dri \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
--with-state-trackers=egl,glx,dri,vega \
--with-dri-drivers=radeon
checking build system type... ia64-unknown-linux-gnu
checking host system type... ia64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gmake... no
checking for make... make
checking for python2... no
checking for python... python
checking for makedepend... /usr/bin/makedepend
checking for sed... /bin/sed
checking for a BSD-compatible install... /usr/bin/install -c
checking if compiling with clang... no
checking whether gcc version is sufficient... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether gcc supports -fvisibility=hidden... yes
checking whether g++ supports -fvisibility=hidden... yes
checking whether to enable assembly... no, platform not supported
checking for gcc option to produce PIC... -fPIC
checking for dlopen... no
checking for dlopen in -ldl... yes
checking for posix_memalign... yes
configure: WARNING: vega state tracker is enabled without --enable-openvg
checking pkg-config files for X11 are available... yes
checking for X11... yes
checking for GLPROTO... yes
checking for LIBDRM... yes
checking for DRI2PROTO... yes
checking for XF86VIDMODE... yes
checking for DRIGL... yes
checking for LIBDRM_RADEON... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking for XCB_DRI2... yes
checking for LIBUDEV... yes
checking for xcb_dri2_connect_alignment_pad in -lxcb-dri2... no
checking for GLW... yes
checking for GLUT... yes
configure: error: cannot enable OpenVG without Gallium
At this point, I'm stuck with how to disable OpenVG in order to build
classic Mesa driver only. --disable-openvg isn't a recognized option
apparently.
> Hope this helps,
What am I missing there?
Émeric
Reply to: