Some app can't start with "Couldn't find matching GLX visual"

So I found the solution. This is a bug in mesa, so I was able to track the source of the error to an update of mesa, then to the commit of mesa that caused the error. Just used an old version of mesa (related issue: regression affecting texture rendering (#2908) · Issues · Mesa / mesa · GitLab).

The temporary solution is to set the variable AMD_DEBUG to nodmacopyimage .