[Mesa-dev] [PATCH gles3] i965: Fix maximum supported OpenGL ES2 context version
Kenneth Graunke
kenneth at whitecape.org
Tue Nov 20 21:46:01 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>
> ---
> 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;
Oops. Yeah, that's definitely necessary.
Feel free to replace my patch or squash them and claim authorship.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list