From: Dave Airlie Date: Wed, 1 Jun 2016 06:16:30 +0000 (+1000) Subject: glsl: define some GLES3 constants in GLSL 4.1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ebf4257a385972be0b6e851383ee6b728515aad;p=mesa.git glsl: define some GLES3 constants in GLSL 4.1 The GLSL 4.1 spec adds: gl_MaxVertexUniformVectors gl_MaxFragmentUniformVectors gl_MaxVaryingVectors This fixes: GL45-CTS.gtf31.GL3Tests.uniform_buffer_object.uniform_buffer_object_build_in_constants Reviewed-by: Ilia Mirkin Cc: "12.0 11.2" Signed-off-by: Dave Airlie --- diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index d8b6f6edf97..401c7136659 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -622,7 +622,7 @@ builtin_variable_generator::generate_constants() /* Max uniforms/varyings: GLSL ES counts these in units of vectors; desktop * GL counts them in units of "components" or "floats". */ - if (state->es_shader) { + if (state->is_version(410, 100)) { add_const("gl_MaxVertexUniformVectors", state->Const.MaxVertexUniformComponents / 4); add_const("gl_MaxFragmentUniformVectors",