3D viewer: Circles rendering artifacts with Mesa 20.2+ llvmpipe software renderer and MSAA enabled.
Description
- If antialiasing is disabled (normally, or while moving), these artifacts disappear.
- If "While Moving" - "Disable holes" is checked, and the view is moved, these artifacts disappear.
- Mesa versions less than 20.2.x don't support multisampling in llvmpipe, so no artifacts visible. 20.2.x and above support 4x multisampling.
glxinfo | grep OpenGL:
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
Apitrace
To see artifacts, pass --samples 4
to glretrace. If you want to see it in qapitrace, you have to create a wrapper script, I guess (or modify the source code to pass --samples).
if glretrace crashes, see https://github.com/apitrace/apitrace/pull/802
Steps to reproduce
-
Ensure that Mesa's version is at least 20.2.6 (multisampling wasn't supported in 20.1.x)
-
export LIBGL_ALWAYS_SOFTWARE=1
(or do something like connecting through a VNC session) -
Through
glxinfo | grep OpenGL
verify, that llvmpipe renderer is used. -
Run pcbnew, check that 3D viewer's Anti-aliasing is set to 4x (or 8x).
Other settings used for the report:
- Open 3D viewer, zoom to circular pads and segment ends and see the artifacts.
KiCad Version
Version given for 6.99, but this also applies to 6.0.5.
Application: KiCad PCB Editor
Version: (6.99.0-2131-ge0f0bb2edd), debug build
Libraries:
wxWidgets 3.0.4
FreeType 2.10.1
HarfBuzz 2.6.4
FontConfig 2.13.1
libcurl/7.68.0 NSS/3.49.1 zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-117-generic x86_64, 64 bit, Little endian, wxGTK, ,
Build Info:
Date: Jun 10 2022 18:47:35
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.79.0
Curl: 7.68.0
ngspice: 26
Compiler: GCC 9.4.0 with C++ ABI 1013
Build settings:
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF
@KammutierSpule what do you think?