HI Chris, The approach looks very good.
On 12 April 2017 at 11:11, Chris Wilson <[email protected]> wrote: > @@ -312,6 +312,60 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay > *dpy, > ctx->Flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR; > break; > > + case EGL_CONTEXT_PRIORITY_LEVEL_IMG: > + if (dpy->Extensions.IMG_context_priority & (1 << bit)) > + ctx->ContextPriority = val; > + > + break; > + } > + > default: > err = EGL_BAD_ATTRIBUTE; > break; > @@ -505,6 +559,7 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, > _EGLConfig *conf, > ctx->Flags = 0; > ctx->Profile = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR; > ctx->ResetNotificationStrategy = EGL_NO_RESET_NOTIFICATION_KHR; > + ctx->ContextPriority = EGL_CONTEXT_PRIORITY_MEDIUM_IMG; > Nicely spotted. > err = _eglParseContextAttribList(ctx, dpy, attrib_list); > if (err == EGL_SUCCESS && ctx->Config) { > @@ -570,6 +625,9 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, > _EGLContext *c, > case EGL_RENDER_BUFFER: > *value = _eglQueryContextRenderBuffer(c); > break; > + case EGL_CONTEXT_PRIORITY_LEVEL_IMG: > + *value = c->ContextPriority; > + break; > default: > return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext"); > + unsigned int IMG_context_priority; > +#define __EGL_CONTEXT_PRIORITY_LOW_BIT 0 > +#define __EGL_CONTEXT_PRIORITY_MEDIUM_BIT 1 > +#define __EGL_CONTEXT_PRIORITY_HIGH_BIT 2 > + Can we drop these these defines - we don't seem to do anything. With that Reviewed-by: Emil Velikov <[email protected]> -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
