Flatpak with openGL don't render correctly

Hi,

Flatpaks on my system don’t render well, when they use OpenGL.

Here is a comparison with Krita (This is not about Krita, I want to use a different app which is not available for TW and can currently not be compiled on OBS due to some other library broken):

https://i.imgur.com/KqHxd55.png


> flatpak list
**Name                                            Application ID                                   Version             Branch               Origin            Installation**
InVesalius                                      br.gov.cti.invesalius                            3.1.99998           stable               flathub           system
Aliza MS                                        com.github.AlizaMedicalImaging.AlizaMS           1.8.3               stable               flathub           system
Freedesktop Platform                            org.freedesktop.Platform                         21.08.15            21.08                flathub           system
Mesa                                            org.freedesktop.Platform.GL.default              21.3.9              21.08                flathub           system
openh264                                        org.freedesktop.Platform.openh264                2.1.0               2.0                  flathub           system
GNOME Application Platform version 42           org.gnome.Platform                                                   42                   flathub           system
Breeze GTK theme                                org.gtk.Gtk3theme.Breeze                         5.25.4              3.22                 flathub           system
Breeze Gtk theme                                org.gtk.Gtk3theme.Breeze-Dark                                        3.22                 flathub           system
Adwaita theme                                   org.kde.KStyle.Adwaita                                               master               kdeapps           system
KDE Application Platform                        org.kde.Platform                                                     5.15-21.08           flathub           system
QGnomePlatform                                  org.kde.PlatformTheme.QGnomePlatform                                 5.15                 flathub           system
Krita                                           org.kde.krita                                    5.1.0               stable               flathub           system

This is Plasma on X11 on a AMD Radeon RX 5500 XT with amdgpu drivers


> glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
...
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 5500 XT (navi14, LLVM 14.0.6, DRM 3.47, 5.19.2-1-default)

Switching off the compositor does not make a difference.

Any ideas?