Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-02-23 Thread Matt Turner
On Thu, Feb 23, 2017 at 11:41 AM, Emil Velikov  wrote:
> On 30 January 2017 at 02:20, Matt Turner  wrote:
>> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
>> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
>> is designed to work on hardware like i915.
>>
>> The piglit results look like:
>>
>>name: before-revert-i915 after-revert-i915
>>  -- -
>>pass:   7171  2169
>>fail:933   201
>>   crash:  8 7
>>skip:  32997 38676
>> timeout:  0 0
>>warn:  3 1
>>  incomplete:  0 0
>>  dmesg-warn:  0 0
>>  dmesg-fail:  0 0
>> changes:  0  6040
>>   fixes:  0   292
>> regressions:  0 2
>>   total:  41112 41054
>>
>> Cc: "17.0" 
> Friendly FYI:
>
> The commit seems to be self-rejected by dropping the nomination tag,
> prior to commiting to master.
> Please let me know if that's incorrect and you'd like this in stable -
> personally, I'm split if it's a good idea to merge it or not.

Yeah, I forgot about the patch and caused it to miss the 17.0 release.
I wanted the change to first be available in a major release, so since
17.0 is already out, I dropped the stable tag.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-02-23 Thread Emil Velikov
On 30 January 2017 at 02:20, Matt Turner  wrote:
> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
> is designed to work on hardware like i915.
>
> The piglit results look like:
>
>name: before-revert-i915 after-revert-i915
>  -- -
>pass:   7171  2169
>fail:933   201
>   crash:  8 7
>skip:  32997 38676
> timeout:  0 0
>warn:  3 1
>  incomplete:  0 0
>  dmesg-warn:  0 0
>  dmesg-fail:  0 0
> changes:  0  6040
>   fixes:  0   292
> regressions:  0 2
>   total:  41112 41054
>
> Cc: "17.0" 
Friendly FYI:

The commit seems to be self-rejected by dropping the nomination tag,
prior to commiting to master.
Please let me know if that's incorrect and you'd like this in stable -
personally, I'm split if it's a good idea to merge it or not.

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-02-01 Thread Kenneth Graunke
On Wednesday, February 1, 2017 12:35:15 PM PST Eero Tamminen wrote:
> Hi,
> 
> On 31.01.2017 21:12, Matt Turner wrote:
> > On Sun, Jan 29, 2017 at 8:29 PM, Kenneth Graunke  
> > wrote:
> >> On Sunday, January 29, 2017 6:20:10 PM PST Matt Turner wrote:
> >>> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
> >>> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
> >>> is designed to work on hardware like i915.
> >>
> >> Your commit message should mention why dropping from OpenGL 2.1 to 1.4
> >> is a good thing.
> >>
> >> (IIRC it's because Chrome (and other apps?) use really slow paths with
> >> 2.1, and so the general usability of the system is likely to be worse.)
>  >
> > Yeah, I'll add
> 
> Has that been profiled?  I assume the issue is the constant uploads 
> Chrome does for the Browser's CPU rendered page content updates.  There 
> are not many other workloads that utilize GPU as inefficiently as 
> current browsers.
> 
> 
>   - Eero

I figured it was just software rendering everything, given that there's
no vertex shading support and only 64 fragment shader instructions...

prog_execute isn't exactly a state-of-the-art interpreter, either.

--Ken


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-02-01 Thread Eero Tamminen

Hi,

On 31.01.2017 21:12, Matt Turner wrote:

On Sun, Jan 29, 2017 at 8:29 PM, Kenneth Graunke  wrote:

On Sunday, January 29, 2017 6:20:10 PM PST Matt Turner wrote:

This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
is designed to work on hardware like i915.


Your commit message should mention why dropping from OpenGL 2.1 to 1.4
is a good thing.

(IIRC it's because Chrome (and other apps?) use really slow paths with
2.1, and so the general usability of the system is likely to be worse.)

>

Yeah, I'll add


Has that been profiled?  I assume the issue is the constant uploads 
Chrome does for the Browser's CPU rendered page content updates.  There 
are not many other workloads that utilize GPU as inefficiently as 
current browsers.



- Eero


Chrome only uses the GPU if you have GL >= 2.0, and using i915 (and
prog_execute) actually hurt performance compared with the software
paths.

>

The piglit results look like:

   name: before-revert-i915 after-revert-i915
     -- -
   pass:   7171  2169
   fail:933   201
  crash:  8 7
   skip:  32997 38676
timeout:  0 0
   warn:  3 1
 incomplete:  0 0
 dmesg-warn:  0 0
 dmesg-fail:  0 0
changes:  0  6040
  fixes:  0   292
regressions:  0 2
  total:  41112 41054


Why are these interesting?


I thought it was interesting to see that GL 2.1 support actually
regressed 292 tests of GL 1.0 and 1.1 functionality (most of them in
spec/!opengl 1.1/clipflat/). I can remove it from the commit message.




Cc: "17.0" 
---
 src/mesa/drivers/dri/i915/intel_extensions.c |  8 ++--
 src/mesa/drivers/dri/i915/intel_screen.c | 21 +++--
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c 
b/src/mesa/drivers/dri/i915/intel_extensions.c
index ab7820f..4f2c6fa 100644
--- a/src/mesa/drivers/dri/i915/intel_extensions.c
+++ b/src/mesa/drivers/dri/i915/intel_extensions.c
@@ -92,8 +92,12 @@ intelInitExtensions(struct gl_context *ctx)
   ctx->Extensions.ATI_separate_stencil = true;
   ctx->Extensions.ATI_texture_env_combine3 = true;
   ctx->Extensions.NV_texture_env_combine4 = true;
-  ctx->Extensions.ARB_fragment_shader = true;
-  ctx->Extensions.ARB_occlusion_query = true;
+
+  if (driQueryOptionb(>optionCache, "fragment_shader"))
+ ctx->Extensions.ARB_fragment_shader = true;


I get dropping GLSL support, but isn't GL_ARB_fragment_shader sort of
reasonable for this hardware?


I don't know. I'm just reverting it to how it was before commit 97217a40f97cd.

Ian, do you have an opinion?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-01-31 Thread Matt Turner
On Sun, Jan 29, 2017 at 8:29 PM, Kenneth Graunke  wrote:
> On Sunday, January 29, 2017 6:20:10 PM PST Matt Turner wrote:
>> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
>> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
>> is designed to work on hardware like i915.
>
> Your commit message should mention why dropping from OpenGL 2.1 to 1.4
> is a good thing.
>
> (IIRC it's because Chrome (and other apps?) use really slow paths with
> 2.1, and so the general usability of the system is likely to be worse.)

Yeah, I'll add

Chrome only uses the GPU if you have GL >= 2.0, and using i915 (and
prog_execute) actually hurt performance compared with the software
paths.

>> The piglit results look like:
>>
>>name: before-revert-i915 after-revert-i915
>>  -- -
>>pass:   7171  2169
>>fail:933   201
>>   crash:  8 7
>>skip:  32997 38676
>> timeout:  0 0
>>warn:  3 1
>>  incomplete:  0 0
>>  dmesg-warn:  0 0
>>  dmesg-fail:  0 0
>> changes:  0  6040
>>   fixes:  0   292
>> regressions:  0 2
>>   total:  41112 41054
>
> Why are these interesting?

I thought it was interesting to see that GL 2.1 support actually
regressed 292 tests of GL 1.0 and 1.1 functionality (most of them in
spec/!opengl 1.1/clipflat/). I can remove it from the commit message.

>
>> Cc: "17.0" 
>> ---
>>  src/mesa/drivers/dri/i915/intel_extensions.c |  8 ++--
>>  src/mesa/drivers/dri/i915/intel_screen.c | 21 +++--
>>  2 files changed, 25 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c 
>> b/src/mesa/drivers/dri/i915/intel_extensions.c
>> index ab7820f..4f2c6fa 100644
>> --- a/src/mesa/drivers/dri/i915/intel_extensions.c
>> +++ b/src/mesa/drivers/dri/i915/intel_extensions.c
>> @@ -92,8 +92,12 @@ intelInitExtensions(struct gl_context *ctx)
>>ctx->Extensions.ATI_separate_stencil = true;
>>ctx->Extensions.ATI_texture_env_combine3 = true;
>>ctx->Extensions.NV_texture_env_combine4 = true;
>> -  ctx->Extensions.ARB_fragment_shader = true;
>> -  ctx->Extensions.ARB_occlusion_query = true;
>> +
>> +  if (driQueryOptionb(>optionCache, "fragment_shader"))
>> + ctx->Extensions.ARB_fragment_shader = true;
>
> I get dropping GLSL support, but isn't GL_ARB_fragment_shader sort of
> reasonable for this hardware?

I don't know. I'm just reverting it to how it was before commit 97217a40f97cd.

Ian, do you have an opinion?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-01-30 Thread Stéphane Marchesin
On Sun, Jan 29, 2017 at 8:29 PM, Kenneth Graunke  wrote:
> On Sunday, January 29, 2017 6:20:10 PM PST Matt Turner wrote:
>> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
>> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
>> is designed to work on hardware like i915.
>
> Your commit message should mention why dropping from OpenGL 2.1 to 1.4
> is a good thing.
>
> (IIRC it's because Chrome (and other apps?) use really slow paths with
> 2.1, and so the general usability of the system is likely to be worse.)

FWIW Chrome doesn't use the GPU if you have GL < 2.0

Stéphane

>
>> The piglit results look like:
>>
>>name: before-revert-i915 after-revert-i915
>>  -- -
>>pass:   7171  2169
>>fail:933   201
>>   crash:  8 7
>>skip:  32997 38676
>> timeout:  0 0
>>warn:  3 1
>>  incomplete:  0 0
>>  dmesg-warn:  0 0
>>  dmesg-fail:  0 0
>> changes:  0  6040
>>   fixes:  0   292
>> regressions:  0 2
>>   total:  41112 41054
>
> Why are these interesting?
>
>> Cc: "17.0" 
>> ---
>>  src/mesa/drivers/dri/i915/intel_extensions.c |  8 ++--
>>  src/mesa/drivers/dri/i915/intel_screen.c | 21 +++--
>>  2 files changed, 25 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c 
>> b/src/mesa/drivers/dri/i915/intel_extensions.c
>> index ab7820f..4f2c6fa 100644
>> --- a/src/mesa/drivers/dri/i915/intel_extensions.c
>> +++ b/src/mesa/drivers/dri/i915/intel_extensions.c
>> @@ -92,8 +92,12 @@ intelInitExtensions(struct gl_context *ctx)
>>ctx->Extensions.ATI_separate_stencil = true;
>>ctx->Extensions.ATI_texture_env_combine3 = true;
>>ctx->Extensions.NV_texture_env_combine4 = true;
>> -  ctx->Extensions.ARB_fragment_shader = true;
>> -  ctx->Extensions.ARB_occlusion_query = true;
>> +
>> +  if (driQueryOptionb(>optionCache, "fragment_shader"))
>> + ctx->Extensions.ARB_fragment_shader = true;
>
> I get dropping GLSL support, but isn't GL_ARB_fragment_shader sort of
> reasonable for this hardware?
>
>> +
>> +  if (driQueryOptionb(>optionCache, "stub_occlusion_query"))
>> + ctx->Extensions.ARB_occlusion_query = true;
>> }
>>
>> if (intel->ctx.Mesa_DXTn
>> diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
>> b/src/mesa/drivers/dri/i915/intel_screen.c
>> index 5c7c06a..fe86179 100644
>> --- a/src/mesa/drivers/dri/i915/intel_screen.c
>> +++ b/src/mesa/drivers/dri/i915/intel_screen.c
>> @@ -62,6 +62,10 @@ DRI_CONF_BEGIN
>>DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 
>> 945-only).")
>>DRI_CONF_OPT_END
>>
>> +  DRI_CONF_OPT_BEGIN_B(fragment_shader, "true")
>> +  DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 
>> 915/945.")
>> +  DRI_CONF_OPT_END
>> +
>> DRI_CONF_SECTION_END
>> DRI_CONF_SECTION_QUALITY
>>DRI_CONF_FORCE_S3TC_ENABLE("false")
>> @@ -75,6 +79,10 @@ DRI_CONF_BEGIN
>>DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
>>DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
>>
>> +  DRI_CONF_OPT_BEGIN_B(stub_occlusion_query, "false")
>> +  DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 
>> 915/945.")
>> +  DRI_CONF_OPT_END
>> +
>>DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
>>DRI_CONF_DESC(en, "Perform code generation at shader link time.")
>>DRI_CONF_OPT_END
>> @@ -1125,12 +1133,21 @@ set_max_gl_versions(struct intel_screen *screen)
>> __DRIscreen *psp = screen->driScrnPriv;
>>
>> switch (screen->gen) {
>> -   case 3:
>> +   case 3: {
>> +  bool has_fragment_shader = driQueryOptionb(>optionCache, 
>> "fragment_shader");
>> +  bool has_occlusion_query = driQueryOptionb(>optionCache, 
>> "stub_occlusion_query");
>> +
>>psp->max_gl_core_version = 0;
>>psp->max_gl_es1_version = 11;
>> -  psp->max_gl_compat_version = 21;
>>psp->max_gl_es2_version = 20;
>> +
>> +  if (has_fragment_shader && has_occlusion_query) {
>> + psp->max_gl_compat_version = 21;
>> +  } else {
>> + psp->max_gl_compat_version = 14;
>> +  }
>>break;
>> +   }
>> case 2:
>>psp->max_gl_core_version = 0;
>>psp->max_gl_compat_version = 13;
>>
>
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>

Re: [Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-01-29 Thread Kenneth Graunke
On Sunday, January 29, 2017 6:20:10 PM PST Matt Turner wrote:
> This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
> It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
> is designed to work on hardware like i915.

Your commit message should mention why dropping from OpenGL 2.1 to 1.4
is a good thing.

(IIRC it's because Chrome (and other apps?) use really slow paths with
2.1, and so the general usability of the system is likely to be worse.)

> The piglit results look like:
> 
>name: before-revert-i915 after-revert-i915
>  -- -
>pass:   7171  2169
>fail:933   201
>   crash:  8 7
>skip:  32997 38676
> timeout:  0 0
>warn:  3 1
>  incomplete:  0 0
>  dmesg-warn:  0 0
>  dmesg-fail:  0 0
> changes:  0  6040
>   fixes:  0   292
> regressions:  0 2
>   total:  41112 41054

Why are these interesting?

> Cc: "17.0" 
> ---
>  src/mesa/drivers/dri/i915/intel_extensions.c |  8 ++--
>  src/mesa/drivers/dri/i915/intel_screen.c | 21 +++--
>  2 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c 
> b/src/mesa/drivers/dri/i915/intel_extensions.c
> index ab7820f..4f2c6fa 100644
> --- a/src/mesa/drivers/dri/i915/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i915/intel_extensions.c
> @@ -92,8 +92,12 @@ intelInitExtensions(struct gl_context *ctx)
>ctx->Extensions.ATI_separate_stencil = true;
>ctx->Extensions.ATI_texture_env_combine3 = true;
>ctx->Extensions.NV_texture_env_combine4 = true;
> -  ctx->Extensions.ARB_fragment_shader = true;
> -  ctx->Extensions.ARB_occlusion_query = true;
> +
> +  if (driQueryOptionb(>optionCache, "fragment_shader"))
> + ctx->Extensions.ARB_fragment_shader = true;

I get dropping GLSL support, but isn't GL_ARB_fragment_shader sort of
reasonable for this hardware?

> +
> +  if (driQueryOptionb(>optionCache, "stub_occlusion_query"))
> + ctx->Extensions.ARB_occlusion_query = true;
> }
>  
> if (intel->ctx.Mesa_DXTn
> diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
> b/src/mesa/drivers/dri/i915/intel_screen.c
> index 5c7c06a..fe86179 100644
> --- a/src/mesa/drivers/dri/i915/intel_screen.c
> +++ b/src/mesa/drivers/dri/i915/intel_screen.c
> @@ -62,6 +62,10 @@ DRI_CONF_BEGIN
>DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 
> 945-only).")
>DRI_CONF_OPT_END
>  
> +  DRI_CONF_OPT_BEGIN_B(fragment_shader, "true")
> +  DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 
> 915/945.")
> +  DRI_CONF_OPT_END
> +
> DRI_CONF_SECTION_END
> DRI_CONF_SECTION_QUALITY
>DRI_CONF_FORCE_S3TC_ENABLE("false")
> @@ -75,6 +79,10 @@ DRI_CONF_BEGIN
>DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
>DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
>  
> +  DRI_CONF_OPT_BEGIN_B(stub_occlusion_query, "false")
> +  DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 
> 915/945.")
> +  DRI_CONF_OPT_END
> +
>DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
>DRI_CONF_DESC(en, "Perform code generation at shader link time.")
>DRI_CONF_OPT_END
> @@ -1125,12 +1133,21 @@ set_max_gl_versions(struct intel_screen *screen)
> __DRIscreen *psp = screen->driScrnPriv;
>  
> switch (screen->gen) {
> -   case 3:
> +   case 3: {
> +  bool has_fragment_shader = driQueryOptionb(>optionCache, 
> "fragment_shader");
> +  bool has_occlusion_query = driQueryOptionb(>optionCache, 
> "stub_occlusion_query");
> +
>psp->max_gl_core_version = 0;
>psp->max_gl_es1_version = 11;
> -  psp->max_gl_compat_version = 21;
>psp->max_gl_es2_version = 20;
> +
> +  if (has_fragment_shader && has_occlusion_query) {
> + psp->max_gl_compat_version = 21;
> +  } else {
> + psp->max_gl_compat_version = 14;
> +  }
>break;
> +   }
> case 2:
>psp->max_gl_core_version = 0;
>psp->max_gl_compat_version = 13;
> 



signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Revert "i915: Always enable GL 2.0 support."

2017-01-29 Thread Matt Turner
This partially reverts commit 97217a40f97cdeae0304798b607f704deb0c3558.
It leaves ES 2.0 support in place per Ian's suggestion, because ES 2.0
is designed to work on hardware like i915.

The piglit results look like:

   name: before-revert-i915 after-revert-i915
     -- -
   pass:   7171  2169
   fail:933   201
  crash:  8 7
   skip:  32997 38676
timeout:  0 0
   warn:  3 1
 incomplete:  0 0
 dmesg-warn:  0 0
 dmesg-fail:  0 0
changes:  0  6040
  fixes:  0   292
regressions:  0 2
  total:  41112 41054

Cc: "17.0" 
---
 src/mesa/drivers/dri/i915/intel_extensions.c |  8 ++--
 src/mesa/drivers/dri/i915/intel_screen.c | 21 +++--
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c 
b/src/mesa/drivers/dri/i915/intel_extensions.c
index ab7820f..4f2c6fa 100644
--- a/src/mesa/drivers/dri/i915/intel_extensions.c
+++ b/src/mesa/drivers/dri/i915/intel_extensions.c
@@ -92,8 +92,12 @@ intelInitExtensions(struct gl_context *ctx)
   ctx->Extensions.ATI_separate_stencil = true;
   ctx->Extensions.ATI_texture_env_combine3 = true;
   ctx->Extensions.NV_texture_env_combine4 = true;
-  ctx->Extensions.ARB_fragment_shader = true;
-  ctx->Extensions.ARB_occlusion_query = true;
+
+  if (driQueryOptionb(>optionCache, "fragment_shader"))
+ ctx->Extensions.ARB_fragment_shader = true;
+
+  if (driQueryOptionb(>optionCache, "stub_occlusion_query"))
+ ctx->Extensions.ARB_occlusion_query = true;
}
 
if (intel->ctx.Mesa_DXTn
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
b/src/mesa/drivers/dri/i915/intel_screen.c
index 5c7c06a..fe86179 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -62,6 +62,10 @@ DRI_CONF_BEGIN
 DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 
945-only).")
   DRI_CONF_OPT_END
 
+  DRI_CONF_OPT_BEGIN_B(fragment_shader, "true")
+DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 
915/945.")
+  DRI_CONF_OPT_END
+
DRI_CONF_SECTION_END
DRI_CONF_SECTION_QUALITY
   DRI_CONF_FORCE_S3TC_ENABLE("false")
@@ -75,6 +79,10 @@ DRI_CONF_BEGIN
   DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
   DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
 
+  DRI_CONF_OPT_BEGIN_B(stub_occlusion_query, "false")
+DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 
915/945.")
+  DRI_CONF_OPT_END
+
   DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
 DRI_CONF_DESC(en, "Perform code generation at shader link time.")
   DRI_CONF_OPT_END
@@ -1125,12 +1133,21 @@ set_max_gl_versions(struct intel_screen *screen)
__DRIscreen *psp = screen->driScrnPriv;
 
switch (screen->gen) {
-   case 3:
+   case 3: {
+  bool has_fragment_shader = driQueryOptionb(>optionCache, 
"fragment_shader");
+  bool has_occlusion_query = driQueryOptionb(>optionCache, 
"stub_occlusion_query");
+
   psp->max_gl_core_version = 0;
   psp->max_gl_es1_version = 11;
-  psp->max_gl_compat_version = 21;
   psp->max_gl_es2_version = 20;
+
+  if (has_fragment_shader && has_occlusion_query) {
+ psp->max_gl_compat_version = 21;
+  } else {
+ psp->max_gl_compat_version = 14;
+  }
   break;
+   }
case 2:
   psp->max_gl_core_version = 0;
   psp->max_gl_compat_version = 13;
-- 
2.7.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev