glsl: fix declarations of gl_MaxVaryingFloats

gl_MaxVaryingFloats was not removed from core until 4.20 and is still
available in compat shaders. Found while writing some new CTS to test
the correct declarations of this constant.

Fixes: 0ebf4257a385i ("glsl: define some GLES3 constants in GLSL 4.1")

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9514>
This commit is contained in:
Timothy Arceri 2021-03-11 14:45:14 +11:00 committed by Marge Bot
parent 6d16d929f3
commit 684f97de80
1 changed files with 6 additions and 4 deletions

View File

@ -772,10 +772,12 @@ builtin_variable_generator::generate_constants()
add_const("gl_MaxDualSourceDrawBuffersEXT",
state->Const.MaxDualSourceDrawBuffers);
}
} else {
/* Note: gl_MaxVaryingFloats was deprecated in GLSL 1.30+, but not
* removed
*/
}
/* gl_MaxVaryingFloats was deprecated in GLSL 1.30+, and was moved to
* compat profile in GLSL 4.20. GLSL ES never supported this constant.
*/
if (compatibility || !state->is_version(420, 100)) {
add_const("gl_MaxVaryingFloats", state->ctx->Const.MaxVarying * 4);
}