GLX giving BadAlloc (insufficient resources for operation)

Running on a clean install of arch linux with the nvidia-dkms 545.29.06-1 drivers. Running on wayland.

I’ve already set modeset = 1 and have confirmed it is set with:
sudo cat /sys/module/nvidia_drm/parameters/modeset
Y

Whenever I run glxinfo or glxgears, or any other 3d graphics, I get:
name of display: :0
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 0
Current serial number in output stream: 29

I have attached my nvidia-bug-report, any help would be greatly appreciated.
nvidia-bug-report.log.gz (485.9 KB)

Did you install Xwayland?

Yes I have Xwayland installed. I can get it to work by forcing mesa for glx:
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
__GLX_VENDOR_LIBRARY_NAME=“mesa”

I’m not sure why it isn’t working with the Nvidia OpenGL since that doesn’t appear to launch glxgears on the gpu.