Check for errors in GLSL shaders using glslangValidator

Please ignore the first 3 commits and instead review them in #956.
C'est fait.