aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-19 15:08:06 -0700
committerIan Romanick <[email protected]>2012-08-14 15:41:03 -0700
commitf171571bfc897921cee63cbba3b71fd9b64174c9 (patch)
tree3e368c37173b2a7a1039ada837d70d58097d703b /src
parent63beb3df98147f34fd0965cb0afbb97444206d0c (diff)
egl: Implement front-end support for EGL_EXT_create_context_robustness
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/main/eglcontext.c25
-rw-r--r--src/egl/main/egldisplay.h2
-rw-r--r--src/egl/main/eglmisc.c2
3 files changed, 29 insertions, 0 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index c9a994836d2..cb50de7a9a7 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -169,6 +169,31 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
ctx->ResetNotificationStrategy = val;
break;
+ case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT:
+ /* The EGL_EXT_create_context_robustness spec says:
+ *
+ * "[EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT] is only
+ * meaningful for OpenGL ES contexts, and specifying it for other
+ * types of contexts will generate an EGL_BAD_ATTRIBUTE error."
+ */
+ if (!dpy->Extensions.EXT_create_context_robustness
+ || api != EGL_OPENGL_ES_API) {
+ err = EGL_BAD_ATTRIBUTE;
+ break;
+ }
+
+ ctx->ResetNotificationStrategy = val;
+ break;
+
+ case EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT:
+ if (!dpy->Extensions.EXT_create_context_robustness) {
+ err = EGL_BAD_ATTRIBUTE;
+ break;
+ }
+
+ ctx->Flags = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
+ break;
+
default:
err = EGL_BAD_ATTRIBUTE;
break;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index ba629411a2d..ccb1fbc6992 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -112,6 +112,8 @@ struct _egl_extensions
EGLBoolean ANDROID_image_native_buffer;
EGLBoolean NV_post_sub_buffer;
+
+ EGLBoolean EXT_create_context_robustness;
};
diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c
index 1f7d9a0e111..b7599d01794 100644
--- a/src/egl/main/eglmisc.c
+++ b/src/egl/main/eglmisc.c
@@ -115,6 +115,8 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
+ _EGL_CHECK_EXTENSION(EXT_create_context_robustness);
+
_EGL_CHECK_EXTENSION(NV_post_sub_buffer);
#undef _EGL_CHECK_EXTENSION
}