[Mesa-dev] [PATCH v2 1/4] egl: Support IMG_context_priority
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 11 17:50:15 UTC 2017
On Tue, Apr 11, 2017 at 10:35:57AM -0700, Ben Widawsky wrote:
> On 17-04-11 17:11:54, Chris Wilson wrote:
> >diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
> >index 05cc523c8d..efe63f3ae4 100644
> >--- a/src/egl/main/eglcontext.c
> >+++ b/src/egl/main/eglcontext.c
> >@@ -312,6 +312,45 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
> > ctx->Flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
> > break;
> >
> >+ case EGL_CONTEXT_PRIORITY_LEVEL_IMG:
> >+ /* The EGL_IMG_context_priority spec says:
> >+ *
> >+ * "EGL_CONTEXT_PRIORITY_LEVEL_IMG determines the priority level of
> >+ * the context to be created. This attribute is a hint, as an
> >+ * implementation may not support multiple contexts at some
> >+ * priority levels and system policy may limit access to high
> >+ * priority contexts to appropriate system privilege level. The
> >+ * default value for EGL_CONTEXT_PRIORITY_LEVEL_IMG is
> >+ * EGL_CONTEXT_PRIORITY_MEDIUM_IMG."
> >+ */
> >+ {
> >+ int bit;
> >+
> >+ switch (val) {
> >+ case EGL_CONTEXT_PRIORITY_HIGH_IMG:
> >+ bit = __EGL_CONTEXT_PRIORITY_HIGH_BIT;
> >+ break;
> >+ case EGL_CONTEXT_PRIORITY_MEDIUM_IMG:
> >+ bit = __EGL_CONTEXT_PRIORITY_MEDIUM_BIT;
> >+ break;
> >+ case EGL_CONTEXT_PRIORITY_LOW_IMG:
> >+ bit = __EGL_CONTEXT_PRIORITY_LOW_BIT;
> >+ break;
> >+ default:
> >+ bit = -1;
> >+ break;
> >+ }
>
> unreachable()?
I thought this was equivelent to a user entry point, i.e. this is the
unfiltered set of Attrib[], and so we should be prepared for garbage?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the mesa-dev
mailing list