Mutter/GNOME Shell leaks VRAM when transitioning between full screen and windowed
Whenever a window transitions between full screen and windowed mode, the VRAM usage of the gnome-shell process increases. This can be monitored using tools like nvidia-smi and radeontop.
This can be seen in games, e.g. by repeatedly pressing Alt-Enter if supported, and can also be reproduced in gedit just by holding down F11 to repeatedly switch.
On NVIDIA you can see that sometimes the VRAM usage will drop after a transition - this appears to be due to the driver paging resources out of VRAM.
Restarting the shell causes the VRAM usage to drop back to normal levels.
This behaviour is seen on GNOME Shell and Mutter version 3.26.2 running on X11, with both NVIDIA and AMD GPUs.