[Mesa-dev] [PATCH] egl: Document why EGL_OPENGL{, _ES}_API are mostly identical

Chad Versace chadversary at chromium.org
Fri Sep 9 19:28:04 UTC 2016


On Thu 08 Sep 2016, Alejandro Piñeiro wrote:
> 
> 
> On 07/09/16 23:41, Adam Jackson wrote:
> > Signed-off-by: Adam Jackson <ajax at redhat.com>
> > ---
> >  src/egl/main/eglcontext.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
> > index ebc004d..057b60f 100644
> > --- a/src/egl/main/eglcontext.c
> > +++ b/src/egl/main/eglcontext.c
> > @@ -457,6 +457,16 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
> >  /**
> >   * Initialize the given _EGLContext object to defaults and/or the values
> >   * in the attrib_list.
> > + *
> > + * According to EGL 1.5 Section 3.7:
> > + *
> > + * "EGL_OPENGL_API and EGL_OPENGL_ES_API are interchangeable for all
> > + *  purposes except eglCreateContext."
> 
> Usually spec quotations add some indentation. Take a look to line 109 on
> the same file.
> 
> > + *
> > + * And since we only support GL and GLES, this is the only place where the
> > + * bound API matters at all. We look up the current API from the current
> > + * thread, and stash that in the context we're initializing. Our caller is
> > + * responsible for determining whether that's an API it supports.
> >   */
> >  EGLBoolean
> >  _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
> > 
> 
> 
> With that fixed:
> Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>

Same indentation request.
Reviewed-by: Chad Versace <chadversary at chromium.org>



More information about the mesa-dev mailing list