[Mesa-dev] [PATCH v2 1/4] mesa/core: Add definitions and translations for EXT_texture_sRGB_R8

Ilia Mirkin imirkin at alum.mit.edu
Tue Oct 30 11:07:39 UTC 2018


Aaaactually, just noticed this in 3/4 but it's here as well:

On Tue, Oct 30, 2018 at 7:03 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> On Tue, Oct 30, 2018 at 6:46 AM Gert Wollny <gert.wollny at collabora.com> wrote:
> >
> > v2: - fix format definition line
> >     - disable  for desktop GL
> >     - don't add GL_R8_EXT to glext.h since it is already in
> >       GLES2/gl2ext.h in glext.h and include this header  where needed
> >       (all Emil)
> > v3: - swrast: Fill the function table for sRGB_R8
> >       The size of the function table is checked at compile time and must
> >       correspond to the number of mesa texture formats.
> >       dri/swrast being gles-2.0 doesn't support the extension though
> > v4: - correct format layout comment (Ilia Mirkin)
> >     - correct logic for accepting GL_RED only textures (in part Ilia Mirkin)
> >       EXT_texture_sRGB_R8 requires OpenGL ES 3.0 which includes
> >       ARB_texture_rg/EXT_texture_rg, so one must check for the first one only
> >       when SR8_EXT is really requested.
> >
> > Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> > ---
> >  src/mesa/main/extensions_table.h |  1 +
> >  src/mesa/main/formats.c          |  2 ++
> >  src/mesa/main/formats.csv        |  1 +
> >  src/mesa/main/formats.h          |  1 +
> >  src/mesa/main/glformats.c        | 21 ++++++++++++++++++---
> >  src/mesa/main/mtypes.h           |  1 +
> >  src/mesa/main/texformat.c        |  7 +++++++
> >  src/mesa/swrast/s_texfetch.c     |  1 +
> >  src/mesa/swrast/s_texfetch_tmp.h |  1 +
> >  9 files changed, 33 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> > index 6cb3435dea..a13bf8c299 100644
> > --- a/src/mesa/main/glformats.c
> > +++ b/src/mesa/main/glformats.c
> > @@ -31,6 +31,10 @@
> >  #include "texcompress.h"
> >  #include "enums.h"
> >
> > +/* For GL_SR8_EXT */
> > +#include <GLES2/gl2.h>
> > +#include <GLES2/gl2ext.h>
> > +
> >  enum {
> >     ZERO = 4,
> >     ONE = 5

We generally have been adding single defines from GLES to glheader.h
directly. There's no other instance of including GLES/gl*, and I don't
see a compelling reason to start now.

  -ilia


More information about the mesa-dev mailing list