[Mesa-dev] [RFC 05/21] mesa/extensions: Add extension::version

Emil Velikov emil.l.velikov at gmail.com
Thu Oct 22 03:17:08 PDT 2015


On 19 October 2015 at 23:36, Nanley Chery <nanleychery at gmail.com> wrote:
> From: Nanley Chery <nanley.g.chery at intel.com>
>
> Enable limiting advertised extension support by context version with
> finer granularity. GLuint is chosen over smaller datatypes because,
> when this field is eventually used, usage of this datatype provides
> the smallest .text size of the compiled library.
>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/mesa/main/extensions.c       |  15 +-
>  src/mesa/main/extensions_table.h | 626 +++++++++++++++++++--------------------
>  2 files changed, 326 insertions(+), 315 deletions(-)
>
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 30f5b98..390e026 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -66,6 +66,11 @@ struct extension {
>     /** Set of API's in which the extension exists, as a bitset. */
>     uint8_t api_set;
>
> +   /** Minimum version the extension requires for the given API
> +    * (see gl_api defined in mtypes.h)
> +    */
> +   GLuint version[API_OPENGL_LAST + 1];
> +
Please use uint*t type, like the surrounding code and add a note that
the version is 10*major+minor.

-Emil


More information about the mesa-dev mailing list