If the override is version is >= 3.1, then update the
max_gl_core_version. Otherwise, update max_gl_compat_version.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
static void
set_max_gl_versions(struct intel_screen *screen)
{
+ int gl_version_override = _mesa_get_gl_version_override();
+
switch (screen->gen) {
case 7:
if (screen->kernel_has_gen7_sol_reset) {
break;
}
+ if (gl_version_override >= 31) {
+ screen->max_gl_core_version = MAX2(screen->max_gl_core_version,
+ gl_version_override);
+ } else {
+ screen->max_gl_compat_version = MAX2(screen->max_gl_compat_version,
+ gl_version_override);
+ }
+
#ifndef FEATURE_ES1
screen->max_gl_es1_version = 0;
#endif