From de77fabe132d63fa3ae951e7d48e89b74ef75e89 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 12 Oct 2020 18:13:19 -0700 Subject: [PATCH] i965: Allow viewport array extensions with allow_higher_compat_version Also fix the obtuse comment. I had to dig back through the commit logs to find the real issue. GL_ARB_viewport_array requires geometry shaders, and in i965 the only way to have that is with a 3.2+ Core profile context... or use allow_higher_compat_version. This increases the maximum Compatibility profile version from 4.0 to 4.6 (on supported hardware) when the allow_higher_compat_version option is used. Reviewed-by: Kenneth Graunke Part-of: --- src/mesa/drivers/dri/i965/intel_extensions.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index ce2989fa86b..e93e72729cc 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -220,10 +220,12 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.EXT_disjoint_timer_query = ctx->Extensions.ARB_timer_query; - /* Only enable this in core profile because other parts of Mesa behave - * slightly differently when the extension is enabled. + /* Only enable this in core profile because geometry shaders are + * required, and Mesa only supports geometry shaders in OpenGL 3.2 and + * later. In this driver, that currently means Core profile. */ - if (ctx->API == API_OPENGL_CORE) { + if (ctx->API == API_OPENGL_CORE || + ctx->Const.AllowHigherCompatVersion) { ctx->Extensions.ARB_shader_viewport_layer_array = true; ctx->Extensions.ARB_viewport_array = true; ctx->Extensions.AMD_vertex_shader_viewport_index = true;