glsl: declare gl_Layer/gl_ViewportIndex/gl_ViewportMask as vs builtins
Otherwise a VS doing the following:
out gl_PerVertex {
vec4 gl_Position;
int gl_ViewportIndex;
};
cannot be compiled because of the following error:
"redeclaration of gl_PerVertex must be a subset of the built-in
members of gl_PerVertex"
v2: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_fs_special_vars.
v3: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in
generate_varyings.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2946
Tested-by: John Galt <johngalt@fake.mail>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v3)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5167>