i965: Fix allow_higher_compat_version workaround limited by OpenGL 3.0

Submitted by Danylo Piliaiev on June 27, 2018, 3:29 p.m.

Details

Message ID 1530113355-7214-1-git-send-email-danylo.piliaiev@globallogic.com
State New
Headers show
Series "i965: Fix allow_higher_compat_version workaround limited by OpenGL 3.0" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Danylo Piliaiev June 27, 2018, 3:29 p.m.
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@globallogic.com>
---
 src/mesa/drivers/dri/i965/intel_extensions.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

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;