Skip to contentSkip to conversation

machine/qemu: Fix OpenGL/GLX support with xserver-xorg.

PATCH In review Carlos Alberto Lopez Perez 2 participants 3 messages Oct 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 machine/qemu: Fix OpenGL/GLX support with xserver-xorg.

* The Xorg server needs to load the GLX extension in order to enable proper OpenGL support.

* Before this patch, glxinfo aborted with:

      root@qemux86:~# glxinfo
      name of display: :0.0
      Error: couldn't find RGB GLX visual or fbconfig

* After this patch, it works as expected:

      root@qemux86:~# glxinfo | grep " render"
      direct rendering: Yes
      OpenGL renderer string: Software Rasterizer
---
 meta/conf/machine/include/qemu.inc | 2 +-
 meta/conf/machine/qemux86-64.conf  | 2 +-
 meta/conf/machine/qemux86.conf     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
meta/conf/machine/include/qemu.inc +1 -1
index d5c0b37..16e9469 100644
@@ -5,7 +5,7 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
 
 XSERVER ?= "xserver-xorg \
-            ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
+            ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
             xf86-input-evdev \
             xf86-input-mouse \
             xf86-video-fbdev \
meta/conf/machine/qemux86-64.conf +1 -1
index a4fd43c..489194a 100644
@@ -16,7 +16,7 @@ KERNEL_IMAGETYPE = "bzImage"
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
 
 XSERVER = "xserver-xorg \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
            xf86-input-vmmouse \
            xf86-input-keyboard \
            xf86-input-evdev \
meta/conf/machine/qemux86.conf +1 -1
index 96cea66..3cc8091 100644
@@ -15,7 +15,7 @@ KERNEL_IMAGETYPE = "bzImage"
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
 
 XSERVER = "xserver-xorg \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
            xf86-input-vmmouse \
            xf86-input-keyboard \
            xf86-input-evdev \
Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines · Carlos Alberto Lopez Perez
      root@qemux86:~# glxinfo | grep " render"
      direct rendering: Yes
      OpenGL renderer string: Software Rasterizer

"Works" being a relative term for the old non-LLVM software renderer ;)

Ross

#2 lore raw
Quoted 12 lines · Ross
Quoted 4 lines · Carlos Alberto Lopez Perez
      root@qemux86:~# glxinfo | grep " render"
      direct rendering: Yes
      OpenGL renderer string: Software Rasterizer

"Works" being a relative term for the old non-LLVM software renderer ;)

Ross

Indeed, that is something that I also would like to fix.

In any case, now I'm able to execute GL apps within qemu using the runqemu script, so is quite an improvement from the previous status-quo.