Commit 2df63b91 authored by Simon Ser's avatar Simon Ser

wip: add getProcAddress to XrGraphicsBindingEGLKHR

parent f10ba4b7
Pipeline #74304 failed with stages
in 2 minutes and 23 seconds
......@@ -384,6 +384,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrConvertTimeToTimespecTimeKHR(
typedef struct XrGraphicsBindingEGLKHR {
XrStructureType type;
const void* XR_MAY_ALIAS next;
PFNEGLGETPROCADDRESSPROC getProcAddress;
EGLDisplay display;
EGLConfig config;
EGLContext context;
......
......@@ -968,6 +968,7 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCT_XrGraphicsBindingEGLKHR(_) \
_(type) \
_(next) \
_(getProcAddress) \
_(display) \
_(config) \
_(context)
......
......@@ -33,6 +33,8 @@ struct wl_display;
typedef void *EGLDisplay;
typedef void *EGLContext;
typedef void *EGLConfig;
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)(const char *procname);
#endif
#ifdef XR_USE_TIMESPEC
......
......@@ -33,6 +33,13 @@ oxr_session_populate_egl(struct oxr_logger *log,
{
EGLint egl_client_type;
PFNEGLQUERYCONTEXTPROC eglQueryContext =
(PFNEGLQUERYCONTEXTPROC) next->getProcAddress("eglQueryContext");
if (!eglQueryContext) {
return oxr_error(log, XR_ERROR_INITIALIZATION_FAILED,
"getProcAddress(eglQueryContext) failed");
}
if (!eglQueryContext(next->display, next->context,
EGL_CONTEXT_CLIENT_TYPE, &egl_client_type)) {
return oxr_error(log, XR_ERROR_INITIALIZATION_FAILED,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment