diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2017-02-28 17:20:52 -0800 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-03-15 14:39:57 +0000 |
commit | 132fc9a975575d7a9d61fccc80cf86ac31447274 (patch) | |
tree | 105b37a38696657dc0beae5fb0ac3a629d5fb9b7 | |
parent | 4c8810f335d6e8490922f11b33c231af207a36dd (diff) |
egl: Ensure ResetNotificationStrategy matches for shared contexts.
Fixes:
dEQP-EGL.functional.robustness.negative_context.invalid_robust_shared_context_creation
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4061bbccf2ad81612afbf8c3ded58c3b7146c5b2)
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index d9e2ad701b7..d847d348f9d 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1086,6 +1086,20 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, if (!_eglInitContext(&dri2_ctx->base, disp, conf, attrib_list)) goto cleanup; + /* The EGL_EXT_create_context_robustness spec says: + * + * "Add to the eglCreateContext context creation errors: [...] + * + * * If the reset notification behavior of <share_context> and the + * newly created context are different then an EGL_BAD_MATCH error is + * generated." + */ + if (share_list && share_list->ResetNotificationStrategy != + dri2_ctx->base.ResetNotificationStrategy) { + _eglError(EGL_BAD_MATCH, "eglCreateContext"); + goto cleanup; + } + switch (dri2_ctx->base.ClientAPI) { case EGL_OPENGL_ES_API: switch (dri2_ctx->base.ClientMajorVersion) { |