glsl: Allow compatibility shaders with MESA_GL_VERSION_OVERRIDE=...
[mesa.git] / src / compiler / glsl / builtin_variables.cpp
index 4eb275e9a6de6f395b2203713b811a3acf267105..be593e9f4338544c6580430fe70530ebc36aa66c 100644 (file)
@@ -444,7 +444,7 @@ private:
 builtin_variable_generator::builtin_variable_generator(
    exec_list *instructions, struct _mesa_glsl_parse_state *state)
    : instructions(instructions), state(state), symtab(state->symbols),
-     compatibility(!state->is_version(140, 100)),
+     compatibility(state->compat_shader || !state->is_version(140, 100)),
      bool_t(glsl_type::bool_type), int_t(glsl_type::int_type),
      uint_t(glsl_type::uint_type),
      float_t(glsl_type::float_type), vec2_t(glsl_type::vec2_type),