egl: Implement EGL_KHR_context_flush_control
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -494,6 +494,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
|
||||
|
||||
_EGL_CHECK_EXTENSION(KHR_cl_event2);
|
||||
_EGL_CHECK_EXTENSION(KHR_config_attribs);
|
||||
_EGL_CHECK_EXTENSION(KHR_context_flush_control);
|
||||
_EGL_CHECK_EXTENSION(KHR_create_context);
|
||||
_EGL_CHECK_EXTENSION(KHR_create_context_no_error);
|
||||
_EGL_CHECK_EXTENSION(KHR_fence_sync);
|
||||
|
@@ -386,6 +386,15 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
break;
|
||||
}
|
||||
|
||||
case EGL_CONTEXT_RELEASE_BEHAVIOR_KHR:
|
||||
if (val == EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR ||
|
||||
val == EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR) {
|
||||
ctx->ReleaseBehavior = val;
|
||||
} else {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
@@ -588,6 +597,7 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
|
||||
ctx->Profile = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
|
||||
ctx->ResetNotificationStrategy = EGL_NO_RESET_NOTIFICATION_KHR;
|
||||
ctx->ContextPriority = EGL_CONTEXT_PRIORITY_MEDIUM_IMG;
|
||||
ctx->ReleaseBehavior = EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR;
|
||||
|
||||
err = _eglParseContextAttribList(ctx, dpy, attrib_list);
|
||||
if (err == EGL_SUCCESS && ctx->Config) {
|
||||
|
@@ -64,6 +64,7 @@ struct _egl_context
|
||||
EGLint ResetNotificationStrategy;
|
||||
EGLint ContextPriority;
|
||||
EGLBoolean NoError;
|
||||
EGLint ReleaseBehavior;
|
||||
|
||||
/* The real render buffer when a window surface is bound */
|
||||
EGLint WindowRenderBuffer;
|
||||
|
@@ -112,6 +112,7 @@ struct _egl_extensions
|
||||
|
||||
EGLBoolean KHR_cl_event2;
|
||||
EGLBoolean KHR_config_attribs;
|
||||
EGLBoolean KHR_context_flush_control;
|
||||
EGLBoolean KHR_create_context;
|
||||
EGLBoolean KHR_fence_sync;
|
||||
EGLBoolean KHR_get_all_proc_addresses;
|
||||
|
Reference in New Issue
Block a user