Use llvmpipe instead of softpipe in yocto - linux

I have an old x86 machine. I build generic intel-core2-i32 machine configuration and installed yocto on it. Display is very slow.
Ubuntu 12.04 runs smoothly on the same machine. Graphics driver is same on both cases : gma500_gfx
Then i looked into glxinfo and found the difference, ubuntu12.04 is using Gallium on llvmpipe
Whereas yocto is using:
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: softpipe
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 19.0.3
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 19.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
How can i change the OpenGL renderer string to "llvmpipe" on Yocto and will this help

You should start by checking that llvmpipe driver is actually enabled. The mesa recipe configuration has this suspicious bit (I believe swrast here really means llvmpipe):
GALLIUMDRIVERS = "swrast"
# gallium swrast was found to crash Xorg on startup in x32 qemu
GALLIUMDRIVERS_x86-x32 = ""
Check the configuration logs or the resulting packages: if llvmpipe is not being built, try removing the last line above and see if that improves things.

Related

Python3 pip install vtk: OpenGL2 Error

I'm trying to install vtk via pip for Python 3.5.1 under CentOS 7.2. It seems to install and work with the system Python 2.7 instead. I get an OpenGL driver incompatibility error with Python 3.
I must use sudo. My attempts:
sudo /path/to/pip3 install vtk
sudo /path/to/python3 -m /path/to/pip3 install vtk
When executing a simple cylinder example Python 2 works properly. Python 3 error messaage:
ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkShaderProgram.cxx, line 446
vtkShaderProgram (0x169d500): 0:31(12): error: extension `GL_EXT_gpu_shader4' unsupported in fragment shader
glxinfo output:
server glx vendor string: SGI
server glx version string: 1.4
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
GLX version: 1.4
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits)
OpenGL version string: 2.1 Mesa 10.6.5
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.6.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
I get the same error with Mesa 17.x. Has anyone installed this under Python 3 with success? What version of Mesa and/or llvm is compatible?
The answer posted here works.
MESA_GL_VERSION_OVERRIDE=3.3 /path/to/executable
I had tried this so many times with a manual install that I gave up on it. I've also seen here that this is a bad idea.
Edit:
I've had to crank up the override version number to 4.5 on other installs.

Investigating 32 bit MESA driver selection

I've used NVidia card, with the properary drivers installed on a Debian Stretch.
But because i'm carry my hard drive between different machines (intel, amd, but always on amd64 act), i'm decided to drop the NVidia card, and rollback opengl to MESA in order to use 3D acceleration on every machine. After a lot of struggling i'm successfully identified and recovered some badly overwritten file (libGL.so, libdrm2.so, by NVidia installer).
Now i'm successfully recovered the 64bit related libraries, so glxgears, browser's WebGL support, gnuplot, etc. works well.
But 32bit libraries (wine, steam) still doesn't work well, it's always falls back to "Mesa X11" render.
I'v used glxgears
$ LIBGL_DEBUG=verbose glxinfo | grep "OpenGL renderer string"
to identify which so and DRI selected. It's prints the lookup process and the renderer:
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
libGL: Using DRI2 for screen 0
OpenGL renderer string: Gallium 0.4 on AMD SUMO (DRM 2.50.0 / 4.12.0-0.bpo.1-amd64, LLVM 3.9.1)
To investigate in 32 bit libraries (we can't have from mesa both the 64 and 32 bit installed), i've downloaded the 32bit version:
$ apt-get download mesa-utils:i386
Unpacked it and tries to figure out why it's fails to select the proper DRI:
LIBGL_DEBUG=verbose ./glxinfo | grep "OpenGL renderer string"
OpenGL renderer string: Mesa X11
The pevious 64bit glxinfo prints debugging information to the stderr therefore we can see how the selection happens.
With 32bit version i can't get any useful information, even if i specify the
LIBGL_DRIVERS_PATH=/usr/lib/i386-linux-gnu/dri/
evironment variable, where mesa might find the proper 32 bit so.
$ file /usr/lib/i386-linux-gnu/dri/r600_dri.so
/usr/lib/i386-linux-gnu/dri/r600_dri.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=d5177f823f11ac8ea7412e517aa6684154de506e, stripped
How can i get more information about the MESA DRI selection?

GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver

I have downloaded ParaView for Linux(from their web site).I try to run the code but
vtkXOpenGLRenderWindow (0x37418c0): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.
My gl info
glxinfo | grep "OpenGL version"
OpenGL version string: 2.1 Mesa 11.0.0-rc1
milenko#milenko-HP-Compaq-6830s:~/ParaView-5.0.1/bin$ glxinfo | grep 'version'
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 2.1 Mesa 11.0.0-rc1
OpenGL shading language version string: 1.30
glxinfo | egrep 'OpenGL|glx'
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV620 (DRM 2.40.0, LLVM 3.4.0)
OpenGL version string: 2.1 Mesa 11.0.0-rc1
OpenGL shading language version string: 1.30
OpenGL extensions:
With lspci | grep -i vga
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620/M82 [Mobility Radeon HD 3410/3430]
My X driver
glxinfo | grep -i vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: X.Org
Mesa is not outdated,I do not understand what should I do. I am on Ubuntu 14.04,64bit.
Your GL implementation is insufficient for the new requirements for ParaView with version 5.0. Linux binaries from paraview.org are bundled with a approriate Mesa 3D build with required extension. Try running paraview as follows to use that Mesa:
paraview --mesa-llvm
See this blog for details.

Does my computer support OpenGL 2.1?

Basing from the above image, is the max version of Opengl my computer can support is 1.4? does that mean that there's no way I can write code with Opengl 2.1?
I'm using Ubuntu 12.04
What you see there is the GLX version. GLX is the container protocol, that delivers OpenGL to the X11 server. You should look for the OpenGL version string, which comes a bit later in that output. Use grep to filter the output, e.g. on my laptop
datenwolf#narfi ~
%> glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 2.1 Mesa 8.0.3
OpenGL shading language version string: 1.20
As you can see, my GLX version is 1.4 as well, but I have OpenGL 2.1 and GLSL 1.20 support on my mobile machine.

Shortest OpenGL geometry shader example that will run on Linux?

I am looking for a a short OpenGL geometry shader example that will run on Linux, preferably with as few dependencies as possible. Basically I want to use that program as a test to see if geometry shaders are supported at all on the system it's currently running on.
Just use glxinfo (in the package mesa-utils on Ubuntu/Debian) and check the extension list (GL_EXT/ARB_geometry_shader4) or OpenGL version (>= 3.2) for geometry shader support.
Extension example:
user#machine:~$ glxinfo | grep "GL_EXT_framebuffer_object"
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object,
Version example:
user#machine:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 2.1 Mesa 7.10.2

Resources