Only inject enabling GL_EXT_multiview for vertex shaders
According to SPIRV-Cross, GL_OVR_multiview2 can only be used
with vertex shaders, and it refuses transpiling to GLSL if gl_ViewIndex
is used in a fragment shader. If this is correct, that is unclear. In any case, the behavior in QShaderBaker should be unified, we already check for VertexStage in some places when it comes to multiview, but not where the GL_EXT_multiview enable line gets injected. Do this only for vertex shaders, but keep our own QSHADER_VIEW_COUNT define working in fragment shaders too. This way if one tries to use gl_ViewIndex in a fragment shader, they get a much more clear error, compared to now.
To be fair, this is in line with what the qsb help text already says.
Change-Id: Idf8f4255efb91ce93412783b7bf5548798188099
Reviewed-by: Andy Nichols <andy.nichols@qt.io>