ctx->Extensions.OES_draw_texture = true;
ctx->Const.GLSLVersion = 120;
+ ctx->Const.GLSLVersionCompat = 120;
_mesa_override_glsl_version(&ctx->Const);
if (intel->gen >= 3) {
ctx->Const.GLSLVersion = 330;
else
ctx->Const.GLSLVersion = 120;
+
+ if (devinfo->gen >= 6)
+ ctx->Const.GLSLVersionCompat = 130;
+ else
+ ctx->Const.GLSLVersionCompat = 120;
+
_mesa_override_glsl_version(&ctx->Const);
ctx->Extensions.EXT_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
GLuint MaxGeometryTotalOutputComponents;
GLuint GLSLVersion; /**< Desktop GLSL version supported (ex: 120 = 1.20) */
+ GLuint GLSLVersionCompat; /**< Desktop compat GLSL version supported */
/**
* Changes default GLSL extension behavior from "error" to "warn". It's out
/* Disable higher GLSL versions for legacy contexts.
* This disallows creation of higher compatibility contexts. */
if (!consts->AllowHigherCompatVersion) {
- if (consts->GLSLVersion > 140) {
- consts->GLSLVersion = 140;
- }
+ consts->GLSLVersion = consts->GLSLVersionCompat;
}
/* fall through */
case API_OPENGL_CORE:
/* Figure out GLSL support and set GLSLVersion to it. */
consts->GLSLVersion = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
+ consts->GLSLVersionCompat = 140;
_mesa_override_glsl_version(consts);