qsb CMake: Support automatic multiview variant generation
Via a new MULTIVIEW keyword.
The idea being that instead of forcing the client to duplicate
the qt_add_shaders() calls with VIEW_COUNT 2 GLSL 330,300es HLSL 61
etc., have an option that, in effect, does that automatically, i.e.
it generates an extra call to qsb with all the non-language (and
non-view-count) arguments plus a default set of
GLSL/HLSL/MSL/VIEW_COUNT arguments (suitable for multiview) injected.
The resulting .qsb files have to be differentiated somehow, this is
done by adding a .mv2qsb suffix. (technically a view count of 3 and
4 are an option too, so leave the door open for that)
QSGMaterialShader is going to get a \internal helper function that
picks up the qsb file with the right suffix based on the view count.
This is meant mainly for internal use, e.g. in Qt Quick's project
files, where there are already multiple qt_add_shaders() calls.
Instead of replicating each and every one of them with multiview
settings, it will be sufficient to add the new keyword and the
rest happens automatically.
Fixes: QTBUG-119743
Change-Id: I0fc499dc8a94065aaafb36b9ba4566725da769b5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>