Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>
On Mon, May 2, 2016 at 10:16 PM, Chad Versace <chad.vers...@intel.com> wrote: > Allow the creation of robust GLES contexts when EGL 1.5 is available, > even when EGL_EXT_create_context_robustness is not. > > Cc: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> > Cc: Emil Velikov <emil.l.veli...@gmail.com> > Signed-off-by: Chad Versace <chad.vers...@intel.com> > --- > src/waffle/egl/wegl_context.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/src/waffle/egl/wegl_context.c b/src/waffle/egl/wegl_context.c > index d88ce9e..0e59231 100644 > --- a/src/waffle/egl/wegl_context.c > +++ b/src/waffle/egl/wegl_context.c > @@ -142,8 +142,14 @@ create_real_context(struct wegl_config *config, > } > > if (attrs->context_robust) { > - attrib_list[i++] = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT; > - attrib_list[i++] = EGL_TRUE; > + // The EGL 1.5 token and the EXT token have different values. > + if (dpy->major_version > 1 || dpy->minor_version >= 5) { > + attrib_list[i++] = EGL_CONTEXT_OPENGL_ROBUST_ACCESS; > + attrib_list[i++] = EGL_TRUE; > + } else { > + attrib_list[i++] = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT; > + attrib_list[i++] = EGL_TRUE; > + } > } > break; > > -- > 2.8.1 > _______________________________________________ waffle mailing list waffle@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/waffle