This patch reduces the active GPU memory consumption by disabling the
depth and stencil buffers. During original testing it reduced GPU memory
usage on Linux by almost a third.
This is a reintroduction of previously reverted patch 3475e44.
Closes #2881.