On 2 May 2018 at 11:27, Timothy Arceri <[email protected]> wrote:

Since this has gone unnoticed for a while, it proves to be subtle. Add
some commit message elaborating on the issue/solution.

> ---
>  src/mesa/drivers/dri/common/dri_util.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/common/dri_util.c 
> b/src/mesa/drivers/dri/common/dri_util.c
> index 7cb6248b130..d72f72d0756 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -389,10 +389,11 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
>          screen->max_gl_compat_version < 31)
>         mesa_api = API_OPENGL_CORE;
>
> -    if (mesa_api == API_OPENGL_COMPAT
> -        && ((ctx_config.major_version > 3)
> -            || (ctx_config.major_version == 3 &&
> -                ctx_config.minor_version >= 2))) {
> +    if (mesa_api == API_OPENGL_COMPAT &&
> +        ((ctx_config.major_version > 3) || (ctx_config.major_version == 3 &&
> +                                            ctx_config.minor_version >= 2)) 
> &&
> +        !((ctx_config.major_version * 10 + ctx_config.minor_version) <=
> +          screen->max_gl_compat_version)) {

Unless I'm misreading it - this seems does the opposite to what the
commit message says.
Namely it causes an error out when the major/minor (overridden or not)
is greater than the max supported one.

In other words the code 'restricts', while the summary implies 'allow'.

-Emil
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to