diff --git a/.pick_status.json b/.pick_status.json index 456f1d33ba9..4826de7d365 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1570,7 +1570,7 @@ "description": "glsl: fix declarations of gl_MaxVaryingFloats", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "0ebf4257a385972be0b6e851383ee6b728515aad" }, diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index 869d4523f6c..2e883479dd2 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -733,10 +733,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); }