Fix a uninitialized memory access reported by Valgrind.

Also don't bother sending a large hunk of uninitialized memory to
the GPU when there's a lot of perfectly uninitialized memory available
on the graphics card.