summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 3f780d155b8..0b94d19fa5d 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -379,6 +379,16 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
}
}
+ /* The specific Mesa driver may not support the GL_ARB_compatibilty
+ * extension or the compatibility profile. In that case, we treat an
+ * API_OPENGL_COMPAT 3.1 as API_OPENGL_CORE. We reject API_OPENGL_COMPAT
+ * 3.2+ in any case.
+ */
+ if (mesa_api == API_OPENGL_COMPAT &&
+ ctx_config.major_version == 3 && ctx_config.minor_version == 1 &&
+ screen->max_gl_compat_version < 31)
+ mesa_api = API_OPENGL_CORE;
+
if (mesa_api == API_OPENGL_COMPAT
&& ((ctx_config.major_version > 3)
|| (ctx_config.major_version == 3 &&