Re: [waffle] [PATCH] egl: Improve support for robust GLES contexts on EGL 1.5
Reviewed-by: Emil Velikov ___ waffle mailing list waffle@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/waffle
Re: [waffle] [PATCH] egl: Improve support for robust GLES contexts on EGL 1.5
Reviewed-by: Bas Nieuwenhuizen On Mon, May 2, 2016 at 10:16 PM, Chad Versace 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 > Cc: Emil Velikov > Signed-off-by: Chad Versace > --- > 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
[waffle] [PATCH] egl: Improve support for robust GLES contexts on EGL 1.5
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 Cc: Emil Velikov Signed-off-by: Chad Versace --- 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