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

Nanley Chery nanleychery at gmail.com
Fri Oct 23 10:54:33 PDT 2015


On Thu, Oct 22, 2015 at 11:02 AM, Chad Versace <chad.versace at intel.com>
wrote:

> On Mon 19 Oct 2015, Nanley Chery 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(-)
>
>
> > @@ -83,8 +88,14 @@ struct extension {
> >   * \brief Table of supported OpenGL extensions for all API's.
> >   */
> >  static const struct extension extension_table[] = {
> > -#define EXT(name_str, driver_cap, api_flags, yyyy) \
> > -        { .name = "GL_" #name_str, .offset = o(driver_cap), .api_set =
> api_flags, .year = yyyy},
> > +#define EXT(name_str, driver_cap, api_flags, gll_ver, glc_ver,
> gles_ver, gles2_ver, yyyy) \
> > +        { .name = "GL_" #name_str, .offset = o(driver_cap), .api_set =
> api_flags, \
> > +          .version = { \
> > +            [API_OPENGL_COMPAT] = gll_ver, \
> > +            [API_OPENGL_CORE]   = glc_ver, \
> > +            [API_OPENGLES]      = gles_ver, \
> > +            [API_OPENGLES2]     = gles2_ver, \
> > +           }, .year = yyyy},
>
> Please place '.year' and the final '}' each on its own line. That makes
> the macro easier to read.
>
>
Will do.


> >  #include "extensions_table.h"
> >  #undef EXT
> >  };
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151023/663f3778/attachment.html>


More information about the mesa-dev mailing list