[Mesa-dev] [PATCH] i965: Fix allow_higher_compat_version workaround limited by OpenGL 3.0

Danylo Piliaiev danylo.piliaiev at gmail.com
Wed Jun 27 15:29:08 UTC 2018


The workaround was designed to allow setting of 3.1+ compatibility
profiles but checks if current api is not API_OPENGL_COMPAT were
introduced later in order to enable certain extensions that were enabled
unconditionally before. These extensions are required for profiles higher
than 3.0 which caused the workaround to become useless.

This commit allows compatibility profiles as high as 4.0 thus fixes
Worms W.M.D, Crookz - The Big Heist and Tropico 5.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107052

Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
---
 src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index f837356..c56e70d 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -185,7 +185,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_pipeline_statistics_query = true;
       ctx->Extensions.ARB_sample_shading = true;
       ctx->Extensions.ARB_shading_language_420pack = true;
-      if (ctx->API != API_OPENGL_COMPAT) {
+      if (ctx->API != API_OPENGL_COMPAT || ctx->Const.AllowHigherCompatVersion) {
          ctx->Extensions.ARB_texture_buffer_object = true;
          ctx->Extensions.ARB_texture_buffer_object_rgb32 = true;
          ctx->Extensions.ARB_texture_buffer_range = true;
@@ -224,7 +224,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_conservative_depth = true;
       ctx->Extensions.ARB_derivative_control = true;
       ctx->Extensions.ARB_framebuffer_no_attachments = true;
-      if (ctx->API != API_OPENGL_COMPAT) {
+      if (ctx->API != API_OPENGL_COMPAT || ctx->Const.AllowHigherCompatVersion) {
          ctx->Extensions.ARB_gpu_shader5 = true;
          ctx->Extensions.ARB_gpu_shader_fp64 = devinfo->has_64bit_types;
       }
@@ -235,7 +235,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_shader_image_size = true;
       ctx->Extensions.ARB_shader_precision = true;
       ctx->Extensions.ARB_shader_texture_image_samples = true;
-      if (ctx->API != API_OPENGL_COMPAT)
+      if (ctx->API != API_OPENGL_COMPAT || ctx->Const.AllowHigherCompatVersion)
          ctx->Extensions.ARB_tessellation_shader = true;
       ctx->Extensions.ARB_texture_compression_bptc = true;
       ctx->Extensions.ARB_texture_view = true;
-- 
2.7.4



More information about the mesa-dev mailing list