[Mesa-dev] [PATCH gles3] i965: Fix maximum supported OpenGL ES2 context version

Ian Romanick idr at freedesktop.org
Tue Nov 20 23:59:42 PST 2012


On 11/20/2012 03:31 PM, Chad Versace wrote:
> brwCreateContext unconditionally set the maximum supported OpenGL ES2
> context version to 3.0. Instead, we need to predicate it on hardware
> capabilities. Set it to 3.0 only if and only if OpenGL 3.0 is supported.
>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>

I modified Ken's patch the same way earlier today.  For now this can 
only go on the gles3 branch... obviously. :)

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>   src/mesa/drivers/dri/i965/brw_context.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index 976cb67..6b04290 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -111,7 +111,7 @@ brwCreateContext(int api,
>         max_supported_version = 11;
>         break;
>      case API_OPENGLES2:
> -      max_supported_version = 30;
> +      max_supported_version = supports_gl30 ? 30 : 20;
>         break;
>      case API_OPENGL_CORE:
>         max_supported_version = supports_gl30 ? 31 : 0;
>



More information about the mesa-dev mailing list