[Mesa-dev] [PATCH 12/13] mesa: rework the way we manage extra_extensions

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 8 13:09:01 UTC 2017


On 7 November 2017 at 11:54, Emil Velikov <emil.l.velikov at gmail.com> wrote:

> @@ -289,19 +268,26 @@ _mesa_one_time_init_extension_overrides(struct gl_context *ctx)
>           recognized = false;
>
>        if (!recognized && enable) {
> -         strcat(extra_extensions, ext);
> -         strcat(extra_extensions, " ");
> +         if (unknown_ext >= MAX_UNRECOGNIZED_EXTENSIONS) {
> +            static bool warned;
> +
> +            if (!warned)
> +               _mesa_problem(ctx, "Trying to enable too many unknown extension. "
> +                                  "Only the first %d will be honoured",
> +                                  MAX_UNRECOGNIZED_EXTENSIONS);
I've update the if block to include "warned = true;"... so that we
warn only once.

> +         } else {
> +            ctx->Extensions.unrecognized_extensions[unknown_ext] = ext;
> +            unknown_ext++;
> +
> +            _mesa_problem(ctx, "Trying to enable unknown extension: %s", ext);
> +         }
>        }
>     }
>

-Emil


More information about the mesa-dev mailing list