1 #include "coregl_tracepath.h"
10 Mutex ctx_access_mutex = MUTEX_INITIALIZER;
11 Ctx_Data *ctx_data = NULL;
14 _get_sostate(GLContext ctx)
16 Sostate_Data *ret = NULL;
18 Ctx_Data *current = ctx_data;
19 while (current != NULL) {
20 if (current->handle == ctx) {
21 current->sostate->ref_count++;
22 ret = current->sostate;
25 current = current->next;
31 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
34 _dump_context_info(const char *ment, int force_output)
36 MY_MODULE_TSTATE *tstate = NULL;
37 static struct timeval tv_last = { 0, 0 };
39 if (get_trace_ctx_flag() != 1) return;
41 AST(mutex_lock(&ctx_access_mutex) == 1);
42 AST(mutex_lock(&general_trace_lists_access_mutex) == 1);
44 if (!force_output && !get_trace_ctx_force_flag()) {
45 struct timeval tv_now = { 0, 0 };
46 AST(gettimeofday(&tv_now, NULL) == 0);
47 if (tv_now.tv_sec - tv_last.tv_sec < _COREGL_TRACE_OUTPUT_INTERVAL_SEC) {
53 GET_MY_TSTATE(tstate, get_current_thread_state());
56 TRACE("\E[40;34m========================================================================================================================\E[0m\n");
57 TRACE("\E[40;32;1m Context info \E[1;37;1m: <PID = %d> %s\E[0m\n", getpid(),
59 TRACE("\E[40;34m========================================================================================================================\E[0m\n");
64 General_Trace_List *current = NULL;
65 current = thread_trace_list;
67 while (current != NULL) {
68 GLThreadState *cur_tstate = (GLThreadState *)current->value;
69 MY_MODULE_TSTATE *cur_tstate_tm = NULL;
71 GET_MY_TSTATE(cur_tstate_tm, cur_tstate);
72 AST(cur_tstate_tm != NULL);
74 if (cur_tstate_tm == NULL)
77 TRACE(" %c Thread [0x%12x] : Surf <D=[%12p] R=[%12p]>",
78 (tstate == cur_tstate_tm) ? '*' : ' ',
79 cur_tstate->thread_id,
80 cur_tstate_tm->surf_draw,
81 cur_tstate_tm->surf_read);
83 if (cur_tstate_tm->ctx != NULL) {
84 TRACE(" EGLCTX=[%12p]\E[0m\n",
85 cur_tstate_tm->ctx->handle);
87 TRACE(" (NOT BINDED TO THREAD)\E[0m\n");
90 // Binded Context State List
92 Ctx_Data *current = NULL;
95 while (current != NULL) {
96 if (cur_tstate_tm->ctx == current) {
97 TRACE(" -> EGLCTX [%12p] : EGLDPY=[%12p] <MC count [%10d]> <Ref [%2d]>\E[0m\n",
104 current = current->next;
110 current = current->next;
114 TRACE("\E[40;33m........................................................................................................................\E[0m\n");
116 // Not-binded Context State List
118 Ctx_Data *current = NULL;
121 while (current != NULL) {
124 General_Trace_List *current_t = NULL;
125 current_t = thread_trace_list;
127 while (current_t != NULL) {
128 GLThreadState *cur_tstate = (GLThreadState *)current_t->value;
129 MY_MODULE_TSTATE *cur_tstate_tm = NULL;
131 GET_MY_TSTATE(cur_tstate_tm, cur_tstate);
132 AST(cur_tstate_tm != NULL);
133 if (cur_tstate_tm != NULL && cur_tstate_tm->ctx == current) {
137 current_t = current_t->next;
141 TRACE(" EGLCTX [%12p] : EGLDPY=[%12p] <MC count [%10d]> <Ref [%2d]>\E[0m\n",
148 current = current->next;
153 TRACE("\E[40;34m========================================================================================================================\E[0m\n");
162 AST(mutex_unlock(&general_trace_lists_access_mutex) == 1);
163 AST(mutex_unlock(&ctx_access_mutex) == 1);
167 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
171 tracepath_add_context(GLContext ctx, GLDisplay dpy, GLContext share_ctx)
173 Ctx_Data *current = NULL;
174 Ctx_Data *data = NULL;
176 AST(mutex_lock(&ctx_access_mutex) == 1);
180 while (current != NULL) {
181 if (current->handle == ctx) {
185 current = current->next;
189 data = (Ctx_Data *)calloc(1, sizeof(Ctx_Data));
190 if (data == NULL) goto finish;
196 data->sostate = _get_sostate(share_ctx);
197 if (data->sostate == NULL) {
198 data->sostate = (Sostate_Data *)calloc(1, sizeof(Sostate_Data));
199 if (data->sostate == NULL) goto finish;
201 data->sostate->ref_count = 1;
204 if (ctx_data != NULL)
205 data->next = ctx_data;
212 AST(mutex_unlock(&ctx_access_mutex) == 1);
217 tracepath_get_context(GLContext ctx)
219 Ctx_Data *current = NULL;
220 Ctx_Data *data = NULL;
222 AST(mutex_lock(&ctx_access_mutex) == 1);
226 while (current != NULL) {
227 if (current->handle == ctx) {
231 current = current->next;
234 COREGL_WARN("Error making context [%p] current. (invalid EGL context)", ctx);
241 AST(mutex_unlock(&ctx_access_mutex) == 1);
246 tracepath_remove_context(GLContext ctx)
248 Ctx_Data *current = NULL;
249 Ctx_Data *prev = NULL;
251 AST(mutex_lock(&ctx_access_mutex) == 1);
255 while (current != NULL) {
256 if (current->handle == ctx) {
257 if (--current->ref_count <= 0) {
259 prev->next = current->next;
261 ctx_data = current->next;
263 if (--current->sostate->ref_count <= 0) {
264 tracepath_glbuf_clear(current->sostate->glbuf_rb);
265 tracepath_glbuf_clear(current->sostate->glbuf_tex);
266 free(current->sostate);
267 current->sostate = NULL;
276 current = current->next;
281 AST(mutex_unlock(&ctx_access_mutex) == 1);
286 tracepath_eglGetError(void)
288 EGLint ret = _COREGL_INT_INIT_VALUE;
290 _COREGL_TRACEPATH_FUNC_BEGIN();
291 ret = _orig_tracepath_eglGetError();
295 _COREGL_TRACEPATH_FUNC_END();
300 tracepath_eglGetDisplay(EGLNativeDisplayType display_id)
302 EGLDisplay ret = EGL_NO_DISPLAY;
304 _COREGL_TRACEPATH_FUNC_BEGIN();
305 ret = _orig_tracepath_eglGetDisplay(display_id);
309 _COREGL_TRACEPATH_FUNC_END();
314 tracepath_eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
316 EGLBoolean ret = EGL_FALSE;
317 _COREGL_TRACEPATH_FUNC_BEGIN();
318 ret = _orig_tracepath_eglInitialize(dpy, major, minor);
322 _COREGL_TRACEPATH_FUNC_END();
327 tracepath_eglTerminate(EGLDisplay dpy)
329 EGLBoolean ret = EGL_FALSE;
331 _COREGL_TRACEPATH_FUNC_BEGIN();
332 ret = _orig_tracepath_eglTerminate(dpy);
336 _COREGL_TRACEPATH_FUNC_END();
341 tracepath_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size,
344 EGLBoolean ret = EGL_FALSE;
346 _COREGL_TRACEPATH_FUNC_BEGIN();
347 ret = _orig_tracepath_eglGetConfigs(dpy, configs, config_size, num_config);
351 _COREGL_TRACEPATH_FUNC_END();
356 tracepath_eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
357 EGLConfig *configs, EGLint config_size, EGLint *num_config)
359 EGLBoolean ret = EGL_FALSE;
361 _COREGL_TRACEPATH_FUNC_BEGIN();
362 ret = _orig_tracepath_eglChooseConfig(dpy, attrib_list, configs, config_size,
367 _COREGL_TRACEPATH_FUNC_END();
372 tracepath_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute,
375 EGLBoolean ret = EGL_FALSE;
377 _COREGL_TRACEPATH_FUNC_BEGIN();
378 ret = _orig_tracepath_eglGetConfigAttrib(dpy, config, attribute, value);
382 _COREGL_TRACEPATH_FUNC_END();
388 tracepath_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
389 EGLNativeWindowType win, const EGLint *attrib_list)
391 EGLSurface ret = EGL_NO_SURFACE;
393 _COREGL_TRACEPATH_FUNC_BEGIN();
394 ret = _orig_tracepath_eglCreateWindowSurface(dpy, config, win, attrib_list);
398 _COREGL_TRACEPATH_FUNC_END();
403 tracepath_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
404 const EGLint *attrib_list)
406 EGLSurface ret = EGL_NO_SURFACE;
408 _COREGL_TRACEPATH_FUNC_BEGIN();
409 ret = _orig_tracepath_eglCreatePbufferSurface(dpy, config, attrib_list);
413 _COREGL_TRACEPATH_FUNC_END();
418 tracepath_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
419 EGLNativePixmapType pixmap, const EGLint *attrib_list)
421 EGLSurface ret = EGL_NO_SURFACE;
423 _COREGL_TRACEPATH_FUNC_BEGIN();
424 ret = _orig_tracepath_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
428 _COREGL_TRACEPATH_FUNC_END();
433 tracepath_eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
435 EGLBoolean ret = EGL_FALSE;
437 _COREGL_TRACEPATH_FUNC_BEGIN();
438 ret = _orig_tracepath_eglDestroySurface(dpy, surface);
442 _COREGL_TRACEPATH_FUNC_END();
443 #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO
446 snprintf(name, sizeof(name), "EGLSURFACE_%p", surface);
447 tracepath_surface_trace_add(name, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL);
449 #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO
454 tracepath_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute,
457 EGLBoolean ret = EGL_FALSE;
459 _COREGL_TRACEPATH_FUNC_BEGIN();
460 ret = _orig_tracepath_eglQuerySurface(dpy, surface, attribute, value);
464 _COREGL_TRACEPATH_FUNC_END();
469 tracepath_eglBindAPI(EGLenum api)
471 EGLBoolean ret = EGL_FALSE;
473 _COREGL_TRACEPATH_FUNC_BEGIN();
474 ret = _orig_tracepath_eglBindAPI(api);
478 _COREGL_TRACEPATH_FUNC_END();
483 tracepath_eglQueryAPI(void)
487 _COREGL_TRACEPATH_FUNC_BEGIN();
488 ret = _orig_tracepath_eglQueryAPI();
492 _COREGL_TRACEPATH_FUNC_END();
497 tracepath_eglWaitClient(void)
499 EGLBoolean ret = EGL_FALSE;
501 _COREGL_TRACEPATH_FUNC_BEGIN();
502 ret = _orig_tracepath_eglWaitClient();
506 _COREGL_TRACEPATH_FUNC_END();
511 tracepath_eglReleaseThread(void)
513 EGLBoolean ret = EGL_FALSE;
515 _COREGL_TRACEPATH_FUNC_BEGIN();
516 ret = _orig_tracepath_eglReleaseThread();
520 _COREGL_TRACEPATH_FUNC_END();
525 tracepath_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype,
526 EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
528 EGLSurface ret = EGL_NO_SURFACE;
530 _COREGL_TRACEPATH_FUNC_BEGIN();
531 ret = _orig_tracepath_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer,
532 config, attrib_list);
536 _COREGL_TRACEPATH_FUNC_END();
541 tracepath_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute,
544 EGLBoolean ret = EGL_FALSE;
546 _COREGL_TRACEPATH_FUNC_BEGIN();
547 ret = _orig_tracepath_eglSurfaceAttrib(dpy, surface, attribute, value);
551 _COREGL_TRACEPATH_FUNC_END();
556 tracepath_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
558 EGLBoolean ret = EGL_FALSE;
560 _COREGL_TRACEPATH_FUNC_BEGIN();
561 ret = _orig_tracepath_eglBindTexImage(dpy, surface, buffer);
565 _COREGL_TRACEPATH_FUNC_END();
570 tracepath_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
572 EGLBoolean ret = EGL_FALSE;
574 _COREGL_TRACEPATH_FUNC_BEGIN();
575 ret = _orig_tracepath_eglReleaseTexImage(dpy, surface, buffer);
579 _COREGL_TRACEPATH_FUNC_END();
584 tracepath_eglSwapInterval(EGLDisplay dpy, EGLint interval)
586 EGLBoolean ret = EGL_FALSE;
588 _COREGL_TRACEPATH_FUNC_BEGIN();
589 ret = _orig_tracepath_eglSwapInterval(dpy, interval);
593 _COREGL_TRACEPATH_FUNC_END();
598 tracepath_eglCreateContext(EGLDisplay dpy, EGLConfig config,
599 EGLContext share_context, const EGLint *attrib_list)
601 EGLContext ret = EGL_NO_CONTEXT;
603 _COREGL_TRACEPATH_FUNC_BEGIN();
604 ret = _orig_tracepath_eglCreateContext(dpy, config, share_context, attrib_list);
608 _COREGL_TRACEPATH_FUNC_END();
610 if (ret != EGL_NO_CONTEXT) {
611 tracepath_add_context(ret, dpy, share_context);
614 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
615 if (unlikely(get_trace_ctx_flag() == 1)) {
616 if (_orig_tracepath_eglCreateContext == _sym_eglCreateContext) {
618 snprintf(ment, sizeof(ment), "eglCreateContext completed (EGLCTX=[%12p])", ret);
619 _dump_context_info(ment, 1);
622 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
627 tracepath_eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
629 EGLBoolean ret = EGL_FALSE;
631 _COREGL_TRACEPATH_FUNC_BEGIN();
632 ret = _orig_tracepath_eglDestroyContext(dpy, ctx);
636 _COREGL_TRACEPATH_FUNC_END();
638 AST(ctx != EGL_NO_CONTEXT);
640 tracepath_remove_context(ctx);
642 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
643 if (unlikely(get_trace_ctx_flag() == 1)) {
644 if (_orig_tracepath_eglDestroyContext == _sym_eglDestroyContext) {
646 snprintf(ment, sizeof(ment), "eglDestroyContext completed (EGLCTX=[%12p])",
648 _dump_context_info(ment, 1);
651 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
656 tracepath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
659 EGLBoolean ret = EGL_FALSE;
661 _COREGL_TRACEPATH_FUNC_BEGIN();
662 ret = _orig_tracepath_eglMakeCurrent(dpy, draw, read, ctx);
666 _COREGL_TRACEPATH_FUNC_END();
668 MY_MODULE_TSTATE *tstate = NULL;
670 GET_MY_TSTATE(tstate, get_current_thread_state());
671 if (tstate == NULL) {
672 init_new_thread_state();
674 GET_MY_TSTATE(tstate, get_current_thread_state());
680 Ctx_Data *oldctx = tstate->ctx;
682 if (ctx != EGL_NO_CONTEXT) {
683 tstate->ctx = tracepath_get_context(ctx);
684 if (tstate->ctx != NULL)
685 tstate->ctx->mc_count++;
691 tracepath_remove_context(oldctx->handle);
693 tstate->surf_draw = draw;
694 tstate->surf_read = read;
697 #ifdef COREGL_TRACEPATH_TRACE_STATE_INFO
698 if (unlikely(get_trace_state_flag() == 1)) {
699 if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent)
700 tracepath_dump_context_states(0);
702 #endif // COREGL_TRACEPATH_TRACE_STATE_INFO
703 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
704 if (unlikely(get_trace_ctx_flag() == 1)) {
705 if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent) {
707 snprintf(ment, sizeof(ment),
708 "eglMakeCurrent finished (EGLCTX=[%12p] Surf=[D:%12p R:%12p])",
710 _dump_context_info(ment, 0);
713 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
718 tracepath_eglGetCurrentContext(void)
720 EGLContext ret = EGL_NO_CONTEXT;
722 _COREGL_TRACEPATH_FUNC_BEGIN();
723 ret = _orig_tracepath_eglGetCurrentContext();
727 _COREGL_TRACEPATH_FUNC_END();
732 tracepath_eglGetCurrentSurface(EGLint readdraw)
734 EGLSurface ret = EGL_NO_SURFACE;
736 _COREGL_TRACEPATH_FUNC_BEGIN();
737 ret = _orig_tracepath_eglGetCurrentSurface(readdraw);
741 _COREGL_TRACEPATH_FUNC_END();
746 tracepath_eglGetCurrentDisplay(void)
748 EGLDisplay ret = EGL_NO_DISPLAY;
750 _COREGL_TRACEPATH_FUNC_BEGIN();
751 ret = _orig_tracepath_eglGetCurrentDisplay();
755 _COREGL_TRACEPATH_FUNC_END();
760 tracepath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute,
763 EGLBoolean ret = EGL_FALSE;
765 _COREGL_TRACEPATH_FUNC_BEGIN();
766 ret = _orig_tracepath_eglQueryContext(dpy, ctx, attribute, value);
770 _COREGL_TRACEPATH_FUNC_END();
775 tracepath_eglWaitGL(void)
777 EGLBoolean ret = EGL_FALSE;
779 _COREGL_TRACEPATH_FUNC_BEGIN();
780 ret = _orig_tracepath_eglWaitGL();
782 _COREGL_TRACE_SURFACE(0, 1, "EGLWAITGL");
787 _COREGL_TRACEPATH_FUNC_END();
792 tracepath_eglWaitNative(EGLint engine)
794 EGLBoolean ret = EGL_FALSE;
796 _COREGL_TRACEPATH_FUNC_BEGIN();
797 ret = _orig_tracepath_eglWaitNative(engine);
801 _COREGL_TRACEPATH_FUNC_END();
806 tracepath_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
808 EGLBoolean ret = EGL_FALSE;
810 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
812 _COREGL_TRACEPATH_FUNC_BEGIN();
813 ret = _orig_tracepath_eglSwapBuffers(dpy, surface);
818 _COREGL_TRACEPATH_FUNC_END();
819 if (unlikely(get_trace_api_frame_flag() == 1)) {
820 if (unlikely(get_trace_api_all_flag() == 1)) {
821 _COREGL_TRACE_API_OUTPUT(1);
823 _COREGL_TRACE_API_OUTPUT(0);
825 _COREGL_TRACE_API_RESET_FRAME();
827 _COREGL_TRACE_API_OUTPUT(0);
829 _COREGL_TRACE_MEM_OUTPUT(0);
834 tracepath_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface,
835 EGLint *rects, EGLint n_rects)
837 EGLBoolean ret = EGL_FALSE;
839 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
841 _COREGL_TRACEPATH_FUNC_BEGIN();
842 ret = _orig_tracepath_eglSwapBuffersWithDamageEXT(dpy, surface, rects, n_rects);
847 _COREGL_TRACEPATH_FUNC_END();
848 if (unlikely(get_trace_api_frame_flag() == 1)) {
849 if (unlikely(get_trace_api_all_flag() == 1)) {
850 _COREGL_TRACE_API_OUTPUT(1);
852 _COREGL_TRACE_API_OUTPUT(0);
854 _COREGL_TRACE_API_RESET_FRAME();
856 _COREGL_TRACE_API_OUTPUT(0);
858 _COREGL_TRACE_MEM_OUTPUT(0);
863 tracepath_eglSwapBuffersRegionEXT(EGLDisplay dpy, EGLSurface surface,
864 EGLint numRects, const EGLint *rects)
866 EGLBoolean ret = EGL_FALSE;
868 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
870 _COREGL_TRACEPATH_FUNC_BEGIN();
871 ret = _orig_tracepath_eglSwapBuffersRegionEXT(dpy, surface, numRects, rects);
876 _COREGL_TRACEPATH_FUNC_END();
877 if (unlikely(get_trace_api_frame_flag() == 1)) {
878 if (unlikely(get_trace_api_all_flag() == 1)) {
879 _COREGL_TRACE_API_OUTPUT(1);
881 _COREGL_TRACE_API_OUTPUT(0);
883 _COREGL_TRACE_API_RESET_FRAME();
885 _COREGL_TRACE_API_OUTPUT(0);
887 _COREGL_TRACE_MEM_OUTPUT(0);
892 tracepath_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
893 EGLNativePixmapType target)
895 EGLBoolean ret = EGL_FALSE;
897 _COREGL_TRACEPATH_FUNC_BEGIN();
898 ret = _orig_tracepath_eglCopyBuffers(dpy, surface, target);
902 _COREGL_TRACEPATH_FUNC_END();
907 tracepath_eglGetProcAddress(const char *procname)
911 _COREGL_TRACEPATH_FUNC_BEGIN();
913 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) \
914 if (strcmp(procname, #FUNC_NAME) == 0) \
916 _eng_fn ret_orig = NULL; \
917 ret_orig = _orig_tracepath_eglGetProcAddress(procname); \
918 if (ret_orig != NULL) \
919 ret = (_eng_fn)ovr_##FUNC_NAME; \
923 #define _COREGL_EXT_SYMBOL_ALIAS(ALIAS_NAME, FUNC_NAME) \
924 if (strcmp(procname, #ALIAS_NAME) == 0) \
926 _eng_fn ret_orig = NULL; \
927 ret_orig = _orig_tracepath_eglGetProcAddress(#ALIAS_NAME); \
928 if (ret_orig != NULL) \
929 ret = (_eng_fn)ovr_##FUNC_NAME; \
933 #include "../headers/sym_egl.h"
934 #include "../headers/sym_gl1.h"
935 #include "../headers/sym_gl2.h"
936 #undef _COREGL_SYMBOL
937 #undef _COREGL_EXT_SYMBOL_ALIAS
939 ret = _orig_tracepath_eglGetProcAddress(procname);
941 COREGL_WARN("TRACEPATH can't support '%s' (tracing for this function will be ignored)",
948 _COREGL_TRACEPATH_FUNC_END();
953 tracepath_eglQueryString(EGLDisplay dpy, EGLint name)
955 const char *ret = NULL;
957 _COREGL_TRACEPATH_FUNC_BEGIN();
958 ret = _orig_tracepath_eglQueryString(dpy, name);
962 _COREGL_TRACEPATH_FUNC_END();
967 tracepath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target,
968 EGLClientBuffer buffer, const EGLint *attrib_list)
972 _COREGL_TRACEPATH_FUNC_BEGIN();
973 ret = _orig_tracepath_eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
977 _COREGL_TRACEPATH_FUNC_END();
982 tracepath_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
984 EGLBoolean ret = EGL_FALSE;
986 _COREGL_TRACEPATH_FUNC_BEGIN();
987 ret = _orig_tracepath_eglDestroyImageKHR(dpy, image);
991 _COREGL_TRACEPATH_FUNC_END();
996 tracepath_eglMapImageSEC(EGLDisplay dpy, EGLImageKHR image, EGLint device_type,
997 EGLint access_option)
1001 _COREGL_TRACEPATH_FUNC_BEGIN();
1002 ret = _orig_tracepath_eglMapImageSEC(dpy, image, device_type, access_option);
1006 _COREGL_TRACEPATH_FUNC_END();
1011 tracepath_eglUnmapImageSEC(EGLDisplay dpy, EGLImageKHR image,
1014 EGLBoolean ret = EGL_FALSE;
1016 _COREGL_TRACEPATH_FUNC_BEGIN();
1017 ret = _orig_tracepath_eglUnmapImageSEC(dpy, image, device_type);
1021 _COREGL_TRACEPATH_FUNC_END();
1026 tracepath_eglGetImageAttribSEC(EGLDisplay dpy, EGLImageKHR image,
1027 EGLint attribute, EGLint *value)
1029 EGLBoolean ret = EGL_FALSE;
1031 _COREGL_TRACEPATH_FUNC_BEGIN();
1032 ret = _orig_tracepath_eglGetImageAttribSEC(dpy, image, attribute, value);
1036 _COREGL_TRACEPATH_FUNC_END();
1041 tracepath_eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface,
1042 const EGLint *attrib_list)
1044 EGLBoolean ret = EGL_FALSE;
1046 _COREGL_TRACEPATH_FUNC_BEGIN();
1047 ret = _orig_tracepath_eglLockSurfaceKHR(display, surface, attrib_list);
1051 _COREGL_TRACEPATH_FUNC_END();
1056 tracepath_eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface)
1058 EGLBoolean ret = EGL_FALSE;
1060 _COREGL_TRACEPATH_FUNC_BEGIN();
1061 ret = _orig_tracepath_eglUnlockSurfaceKHR(display, surface);
1065 _COREGL_TRACEPATH_FUNC_END();
1070 tracepath_eglBindWaylandDisplayWL(EGLDisplay dpy, void *display)
1072 EGLBoolean ret = EGL_FALSE;
1074 _COREGL_TRACEPATH_FUNC_BEGIN();
1075 ret = _orig_tracepath_eglBindWaylandDisplayWL(dpy, display);
1080 _COREGL_TRACEPATH_FUNC_END();
1085 tracepath_eglUnbindWaylandDisplayWL(EGLDisplay dpy, void *display)
1087 EGLBoolean ret = EGL_FALSE;
1089 _COREGL_TRACEPATH_FUNC_BEGIN();
1090 ret = _orig_tracepath_eglUnbindWaylandDisplayWL(dpy, display);
1095 _COREGL_TRACEPATH_FUNC_END();
1100 tracepath_eglQueryWaylandBufferWL(EGLDisplay dpy, void *buffer,
1101 EGLint attribute, EGLint *value)
1103 EGLBoolean ret = EGL_FALSE;
1105 _COREGL_TRACEPATH_FUNC_BEGIN();
1106 ret = _orig_tracepath_eglQueryWaylandBufferWL(dpy, buffer, attribute, value);
1111 _COREGL_TRACEPATH_FUNC_END();
1116 tracepath_eglSetDamageRegionKHR(EGLDisplay dpy, EGLSurface surface,
1117 EGLint *rects, EGLint n_rects)
1119 EGLBoolean ret = EGL_FALSE;
1121 _COREGL_TRACEPATH_FUNC_BEGIN();
1122 ret = _orig_tracepath_eglSetDamageRegionKHR(dpy, surface, rects, n_rects);
1127 _COREGL_TRACEPATH_FUNC_END();
1132 tracepath_eglSwapBuffersWithDamageKHR(EGLDisplay dpy, EGLSurface surface,
1133 EGLint *rects, EGLint n_rects)
1135 EGLBoolean ret = EGL_FALSE;
1137 _COREGL_TRACEPATH_FUNC_BEGIN();
1138 ret = _orig_tracepath_eglSwapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
1143 _COREGL_TRACEPATH_FUNC_END();
1148 tracepath_eglFrontBufferSetSEC(EGLDisplay dpy, EGLSurface surface,
1151 EGLBoolean ret = EGL_FALSE;
1153 _COREGL_TRACEPATH_FUNC_BEGIN();
1154 ret = _orig_tracepath_eglFrontBufferSetSEC(dpy, surface, set);
1159 _COREGL_TRACEPATH_FUNC_END();