i965/gen7: Enable OpenGL 4.0 in Haswell when supported
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 3 Jan 2017 08:27:09 +0000 (09:27 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 5 Jan 2017 07:43:46 +0000 (08:43 +0100)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/drivers/dri/i965/intel_screen.c

index 8e67b5755a7ec8a5f9f6025a38b4dc166819b57d..aa89380217c4d434eaa0ed9dedbb69b7d9bb6560 100644 (file)
@@ -136,6 +136,8 @@ intelInitExtensions(struct gl_context *ctx)
 
    if (brw->gen >= 8)
       ctx->Const.GLSLVersion = 450;
+   else if (brw->is_haswell && can_do_pipelined_register_writes(brw->screen))
+      ctx->Const.GLSLVersion = 400;
    else if (brw->gen >= 6)
       ctx->Const.GLSLVersion = 330;
    else
index 758a328ab789b53d53556956439e5d33947dda45..c3fd6f6685b60d7170c95efb6ed3f9ad07db7834 100644 (file)
@@ -1538,7 +1538,8 @@ set_max_gl_versions(struct intel_screen *screen)
       dri_screen->max_gl_es2_version = has_astc ? 32 : 31;
       break;
    case 7:
-      dri_screen->max_gl_core_version = 33;
+      dri_screen->max_gl_core_version = screen->devinfo.is_haswell &&
+         can_do_pipelined_register_writes(screen) ? 40 : 33;
       dri_screen->max_gl_compat_version = 30;
       dri_screen->max_gl_es1_version = 11;
       dri_screen->max_gl_es2_version = screen->devinfo.is_haswell ? 31 : 30;