i965: Use force_compat_profile driconf option
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Wed, 17 Apr 2019 11:27:16 +0000 (14:27 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 10 Aug 2019 18:39:29 +0000 (11:39 -0700)
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c

index d4bbe0b2b6f51b30647766526ca853e7ee373cd0..571618a9cab86bc8ec9df65276e6de79441e2822 100644 (file)
@@ -990,6 +990,13 @@ brwCreateContext(gl_api api,
    if (notify_reset)
       functions.GetGraphicsResetStatus = brw_get_graphics_reset_status;
 
+   brw_process_driconf_options(brw);
+
+   if (api == API_OPENGL_CORE &&
+       driQueryOptionb(&screen->optionCache, "force_compat_profile")) {
+      api = API_OPENGL_COMPAT;
+   }
+
    struct gl_context *ctx = &brw->ctx;
 
    if (!_mesa_initialize_context(ctx, api, mesaVis, shareCtx, &functions)) {
@@ -1024,8 +1031,6 @@ brwCreateContext(gl_api api,
 
    _mesa_meta_init(ctx);
 
-   brw_process_driconf_options(brw);
-
    if (INTEL_DEBUG & DEBUG_PERF)
       brw->perf_debug = true;
 
index b669f8d138c5928fa6e7603437fabf821ca755ad..83f2f4c2465b8b8f7c4c56dca50d1cdd2824c150 100644 (file)
@@ -88,6 +88,7 @@ DRI_CONF_BEGIN
       DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION("false")
       DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH("false")
       DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
+      DRI_CONF_FORCE_COMPAT_PROFILE("false")
       DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
 
       DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")