i965: enable OpenGL 4.0 to Ivybridge/Baytrail
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 26 Aug 2016 05:39:04 +0000 (07:39 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 14 Apr 2017 21:56:10 +0000 (14:56 -0700)
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/drivers/dri/i965/intel_screen.c

index c6323f96da06b90f360495551d38443e965c5a69..467a0d3e8424c24313fa09d3ef30954a3963617c 100644 (file)
@@ -138,6 +138,8 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Const.GLSLVersion = 450;
    else if (brw->is_haswell && can_do_pipelined_register_writes(brw->screen))
       ctx->Const.GLSLVersion = 450;
+   else if (brw->gen >= 7 && can_do_pipelined_register_writes(brw->screen))
+      ctx->Const.GLSLVersion = 400;
    else if (brw->gen >= 6)
       ctx->Const.GLSLVersion = 330;
    else
index 23a4bd6d6c89c0c83ae3813861a0da53e71659d9..9e536f58b3200c7ec87e8edfaddd85c4ded9531a 100644 (file)
@@ -1653,12 +1653,11 @@ set_max_gl_versions(struct intel_screen *screen)
       break;
    case 7:
       dri_screen->max_gl_core_version = 33;
-      if (screen->devinfo.is_haswell &&
-          can_do_pipelined_register_writes(screen)) {
-         dri_screen->max_gl_core_version = 42;
-         if (can_do_compute_dispatch(screen))
+      if (can_do_pipelined_register_writes(screen)) {
+         dri_screen->max_gl_core_version = screen->devinfo.is_haswell ? 42 : 40;
+         if (screen->devinfo.is_haswell && can_do_compute_dispatch(screen))
             dri_screen->max_gl_core_version = 43;
-         if (can_do_mi_math_and_lrr(screen))
+         if (screen->devinfo.is_haswell && can_do_mi_math_and_lrr(screen))
             dri_screen->max_gl_core_version = 45;
       }
       dri_screen->max_gl_compat_version = 30;