}
/*
- * eglWaitGL dispatcher. id = 21
- */
-static bool yagl_func_eglWaitGL(uint8_t **out_buff,
- uint8_t *in_buff)
-{
- YAGL_LOG_FUNC_ENTER_SPLIT0(eglWaitGL);
- EGLBoolean retval;
- bool res = yagl_host_eglWaitGL(&retval);
- if (!res) {
- YAGL_LOG_FUNC_EXIT(NULL);
- return false;
- }
- YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, retval);
- yagl_marshal_put_EGLBoolean(&in_buff, retval);
- return true;
-}
-
-/*
- * eglWaitNative dispatcher. id = 22
- */
-static bool yagl_func_eglWaitNative(uint8_t **out_buff,
- uint8_t *in_buff)
-{
- EGLint engine = yagl_marshal_get_EGLint(out_buff);
- YAGL_LOG_FUNC_ENTER_SPLIT1(eglWaitNative, EGLint, engine);
- EGLBoolean retval;
- bool res = yagl_host_eglWaitNative(&retval, engine);
- if (!res) {
- YAGL_LOG_FUNC_EXIT(NULL);
- return false;
- }
- YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, retval);
- yagl_marshal_put_EGLBoolean(&in_buff, retval);
- return true;
-}
-
-/*
- * eglSwapBuffers dispatcher. id = 23
+ * eglSwapBuffers dispatcher. id = 21
*/
static bool yagl_func_eglSwapBuffers(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCopyBuffers dispatcher. id = 24
+ * eglCopyBuffers dispatcher. id = 22
*/
static bool yagl_func_eglCopyBuffers(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreateImageKHR dispatcher. id = 25
+ * eglCreateImageKHR dispatcher. id = 23
*/
static bool yagl_func_eglCreateImageKHR(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglDestroyImageKHR dispatcher. id = 26
+ * eglDestroyImageKHR dispatcher. id = 24
*/
static bool yagl_func_eglDestroyImageKHR(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreateWindowSurfaceOffscreenYAGL dispatcher. id = 27
+ * eglCreateWindowSurfaceOffscreenYAGL dispatcher. id = 25
*/
static bool yagl_func_eglCreateWindowSurfaceOffscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreatePbufferSurfaceOffscreenYAGL dispatcher. id = 28
+ * eglCreatePbufferSurfaceOffscreenYAGL dispatcher. id = 26
*/
static bool yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreatePixmapSurfaceOffscreenYAGL dispatcher. id = 29
+ * eglCreatePixmapSurfaceOffscreenYAGL dispatcher. id = 27
*/
static bool yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglResizeOffscreenSurfaceYAGL dispatcher. id = 30
+ * eglResizeOffscreenSurfaceYAGL dispatcher. id = 28
*/
static bool yagl_func_eglResizeOffscreenSurfaceYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglUpdateOffscreenImageYAGL dispatcher. id = 31
+ * eglUpdateOffscreenImageYAGL dispatcher. id = 29
*/
static bool yagl_func_eglUpdateOffscreenImageYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreateWindowSurfaceOnscreenYAGL dispatcher. id = 32
+ * eglCreateWindowSurfaceOnscreenYAGL dispatcher. id = 30
*/
static bool yagl_func_eglCreateWindowSurfaceOnscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreatePbufferSurfaceOnscreenYAGL dispatcher. id = 33
+ * eglCreatePbufferSurfaceOnscreenYAGL dispatcher. id = 31
*/
static bool yagl_func_eglCreatePbufferSurfaceOnscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglCreatePixmapSurfaceOnscreenYAGL dispatcher. id = 34
+ * eglCreatePixmapSurfaceOnscreenYAGL dispatcher. id = 32
*/
static bool yagl_func_eglCreatePixmapSurfaceOnscreenYAGL(uint8_t **out_buff,
uint8_t *in_buff)
}
/*
- * eglInvalidateOnscreenSurfaceYAGL dispatcher. id = 35
+ * eglInvalidateOnscreenSurfaceYAGL dispatcher. id = 33
*/
static bool yagl_func_eglInvalidateOnscreenSurfaceYAGL(uint8_t **out_buff,
uint8_t *in_buff)
return res;
}
-const uint32_t yagl_egl_api_num_funcs = 35;
+const uint32_t yagl_egl_api_num_funcs = 33;
yagl_api_func yagl_egl_api_funcs[] = {
&yagl_func_eglGetError,
&yagl_func_eglDestroyContext,
&yagl_func_eglMakeCurrent,
&yagl_func_eglQueryContext,
- &yagl_func_eglWaitGL,
- &yagl_func_eglWaitNative,
&yagl_func_eglSwapBuffers,
&yagl_func_eglCopyBuffers,
&yagl_func_eglCreateImageKHR,
return res;
}
-bool yagl_host_eglWaitGL(EGLBoolean* retval)
-{
- EGLBoolean tmp;
- EGLenum api = egl_api_ts->api;
-
- if (!yagl_host_eglBindAPI(&tmp, EGL_OPENGL_ES_API)) {
- return false;
- }
-
- if (!yagl_host_eglWaitClient(retval)) {
- return false;
- }
-
- return yagl_host_eglBindAPI(&tmp, api);
-}
-
-bool yagl_host_eglWaitNative(EGLBoolean* retval,
- EGLint engine)
-{
- struct yagl_egl_surface *sfc = NULL;
-
- YAGL_LOG_FUNC_SET(eglWaitNative);
-
- *retval = EGL_FALSE;
-
- if (!egl_api_ts->context) {
- *retval = EGL_TRUE;
- goto out;
- }
-
- if (!egl_api_ts->context->draw) {
- YAGL_SET_ERR(EGL_BAD_CURRENT_SURFACE);
- goto out;
- }
-
- sfc = yagl_egl_display_acquire_surface(egl_api_ts->context->dpy,
- egl_api_ts->context->draw->res.handle);
-
- if (!sfc || (sfc != egl_api_ts->context->draw)) {
- YAGL_SET_ERR(EGL_BAD_CURRENT_SURFACE);
- goto out;
- }
-
- egl_api_ts->backend->wait_native(egl_api_ts->backend);
-
- *retval = EGL_TRUE;
-
-out:
- yagl_egl_surface_release(sfc);
-
- return true;
-}
-
bool yagl_host_eglSwapBuffers(EGLBoolean* retval,
yagl_host_handle dpy_,
yagl_host_handle surface_)
yagl_host_handle ctx_,
EGLint attribute,
target_ulong /* EGLint* */ value_);
-bool yagl_host_eglWaitGL(EGLBoolean* retval);
-bool yagl_host_eglWaitNative(EGLBoolean* retval,
- EGLint engine);
bool yagl_host_eglSwapBuffers(EGLBoolean* retval,
yagl_host_handle dpy_,
yagl_host_handle surface_);
return res || force;
}
-static void yagl_egl_offscreen_wait_native(struct yagl_egl_backend *backend)
-{
- struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
-
- YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_wait_native, NULL);
-
- egl_offscreen->driver->wait_native(egl_offscreen->driver);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-}
-
static void yagl_egl_offscreen_thread_fini(struct yagl_egl_backend *backend)
{
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_thread_fini, NULL);
egl_offscreen->base.create_display = &yagl_egl_offscreen_create_display;
egl_offscreen->base.make_current = &yagl_egl_offscreen_make_current;
egl_offscreen->base.release_current = &yagl_egl_offscreen_release_current;
- egl_offscreen->base.wait_native = &yagl_egl_offscreen_wait_native;
egl_offscreen->base.thread_fini = &yagl_egl_offscreen_thread_fini;
egl_offscreen->base.ensure_current = &yagl_egl_offscreen_ensure_current;
egl_offscreen->base.unensure_current = &yagl_egl_offscreen_unensure_current;
return res || force;
}
-static void yagl_egl_onscreen_wait_native(struct yagl_egl_backend *backend)
-{
- struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
-
- YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_wait_native, NULL);
-
- egl_onscreen->egl_driver->wait_native(egl_onscreen->egl_driver);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-}
-
static void yagl_egl_onscreen_thread_fini(struct yagl_egl_backend *backend)
{
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_thread_fini, NULL);
egl_onscreen->base.create_display = &yagl_egl_onscreen_create_display;
egl_onscreen->base.make_current = &yagl_egl_onscreen_make_current;
egl_onscreen->base.release_current = &yagl_egl_onscreen_release_current;
- egl_onscreen->base.wait_native = &yagl_egl_onscreen_wait_native;
egl_onscreen->base.thread_fini = &yagl_egl_onscreen_thread_fini;
egl_onscreen->base.ensure_current = &yagl_egl_onscreen_ensure_current;
egl_onscreen->base.unensure_current = &yagl_egl_onscreen_unensure_current;
return ret;
}
-static void yagl_egl_glx_wait_native(struct yagl_egl_driver *driver)
-{
- struct yagl_egl_glx *egl_glx = (struct yagl_egl_glx*)driver;
-
- YAGL_EGL_GLX_ENTER(yagl_egl_glx_wait_native, NULL);
-
- egl_glx->glXWaitX();
-
- YAGL_LOG_FUNC_EXIT(NULL);
-}
-
/*
* @}
*/
egl_glx->base.context_create = &yagl_egl_glx_context_create;
egl_glx->base.context_destroy = &yagl_egl_glx_context_destroy;
egl_glx->base.make_current = &yagl_egl_glx_make_current;
- egl_glx->base.wait_native = &yagl_egl_glx_wait_native;
egl_glx->base.destroy = &yagl_egl_glx_destroy;
YAGL_LOG_FUNC_EXIT(NULL);
}
}
-static void yagl_egl_wgl_wait_native(struct yagl_egl_driver *driver)
-{
- YAGL_EGL_WGL_ENTER(yagl_egl_wgl_wait_native, NULL);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-}
-
static void yagl_egl_wgl_destroy(struct yagl_egl_driver *driver)
{
YaglEglWglDriver *egl_wgl = (YaglEglWglDriver *)driver;
egl_driver->context_create = &yagl_egl_wgl_context_create;
egl_driver->context_destroy = &yagl_egl_wgl_context_destroy;
egl_driver->make_current = &yagl_egl_wgl_make_current;
- egl_driver->wait_native = &yagl_egl_wgl_wait_native;
egl_driver->destroy = &yagl_egl_wgl_destroy;
if (!yagl_egl_wgl_init_ext(egl_wgl)) {
bool (*release_current)(struct yagl_egl_backend */*backend*/,
bool /*force*/);
- void (*wait_native)(struct yagl_egl_backend */*backend*/);
-
void (*thread_fini)(struct yagl_egl_backend */*backend*/);
/*
EGLSurface /*read*/,
EGLContext /*ctx*/);
- void (*wait_native)(struct yagl_egl_driver */*driver*/);
-
void (*destroy)(struct yagl_egl_driver */*driver*/);
struct yagl_dyn_lib *dyn_lib;