This BR is similar to bug #88316, but in the opposite way, it seems. Let me explain.
I'm running Gentoo Linux on an ia64 workstation (probably irrelevant here) sporting an ATI FireGL X1 graphics adapter (PCI ID 1002:4e47), the professional equivalent to ATI Radeon 9700 Pro cards.
When running GNOME 3.22 on X11, glxinfo reports that I'm using Gallium 0.4 on ATI R300 as OpenGL renderer (Mesa 13.0.5). That's fine and GL apps are running OK.
When running GNOME 3.22 on Wayland, glxinfo reports that I'm using Gallium 0.4 on softpipe as OpenGL renderer and GL apps are barely usable.
Bug #88316 told me this could be related to glamor. So I first ensured that I can enable glamor acceleration (rather than EXA) for my graphics adapter under GNOME on X11. Enabling DRI3 wasn't a problem, but glamor refuses to initialize, reporting in /var/log/Xorg.0.log:
glamor requires at least 128 instructions (64 reported).
Haha, hence the reason. Googling for this error deeper, I found it comes from a check added in glamor  to prevent weak hardware (such as in bug #88316) to enable glamor and get terrific performances.
As a quick test, I've rebuilt my X.org server 1.19.2, lowering GLAMOR_MIN_ALU_INSTRUCTIONS in glamor/glamor_priv.h from 128 to 64, to match the value reported by my graphics adapter. glamor acceleration was then successfully enabled under GNOME 3.22 on X11. Furthermore, running GNOME 3.22 on Wayland was a globally smoother experience (it appears that GNOME Shell itself is still using Xwayland), glxinfo no more reports Gallium 0.4 on softpipe as OpenGL renderer (but Gallium 0.4 on ATI R300) and GL apps are running near-X11 performances.
Where I'm puzzled is why failing to enable glamor (for 2D hardware acceleration) also falls back to 3D software rendering?
DRI3 support in Xwayland relies on glamor:
(In reply to Olivier Fourdan from comment #1)
> DRI3 support in Xwayland relies on glamor:
OK, but what happens for Xwayland when glamor cannot be initialized? It's apparently not completely disabled, so how does it then work without glamor?
When glamor fails to initialize, Xwayland and all X clients use software rendering.
Lowering GLAMOR_MIN_ALU_INSTRUCTIONS might just happen to work as long as you don't hit any functionality using shaders which actually need more instructions.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/105.