From fc769347a8c4a90353c94b592f04432b0f0f4b8a Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 27 May 2022 13:21:17 +0100 Subject: [PATCH] c/client: Better error logging when failing to make current context --- src/xrt/compositor/client/comp_egl_client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xrt/compositor/client/comp_egl_client.c b/src/xrt/compositor/client/comp_egl_client.c index 57ad10ddd..88e04b818 100644 --- a/src/xrt/compositor/client/comp_egl_client.c +++ b/src/xrt/compositor/client/comp_egl_client.c @@ -284,7 +284,14 @@ xrt_gfx_provider_create_gl_egl(struct xrt_compositor_native *xcn, save_context(&old); if (!eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, context)) { - EGL_ERROR("eglMakeCurrent: %s\n\tFailed to make EGL context current", egl_error_str(eglGetError())); + EGL_ERROR( + "eglMakeCurrent: %s" + "\n\tFailed to make EGL context current" + "\n\told - dpy: %p, ctx: %p, read: %p, draw: %p" + "\n\tnew - dpy: %p, ctx: %p, read: %p, draw: %p", + egl_error_str(eglGetError()), // + (void *)old.dpy, (void *)old.ctx, (void *)old.read, (void *)old.draw, // + (void *)display, (void *)context, NULL, NULL); // // No need to restore on failure. return XRT_ERROR_OPENGL; }