[Mesa-dev] [PATCH v3 23/24] i965: enable OpenGL 4.0 to Ivybridge/Baytrail

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Feb 14 13:01:08 UTC 2017


Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/mesa/drivers/dri/i965/intel_extensions.c | 2 ++
 src/mesa/drivers/dri/i965/intel_screen.c     | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 9d4b109ac3f..05bc5b92187 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -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
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 83b1f3ff556..1afa74a24d6 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1545,8 +1545,10 @@ 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 = screen->devinfo.is_haswell &&
-         can_do_pipelined_register_writes(screen) ? 45 : 33;
+      if (can_do_pipelined_register_writes(screen))
+         dri_screen->max_gl_core_version = screen->devinfo.is_haswell ? 45 : 40;
+      else
+         dri_screen->max_gl_core_version = 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;
-- 
2.11.0



More information about the mesa-dev mailing list