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 (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 && !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 TRACE(" %c Thread [0x%12x] : Surf <D=[%12p] R=[%12p]>",
75 (tstate == cur_tstate_tm) ? '*' : ' ',
76 cur_tstate->thread_id,
77 cur_tstate_tm->surf_draw,
78 cur_tstate_tm->surf_read);
80 if (cur_tstate_tm->ctx != NULL) {
81 TRACE(" EGLCTX=[%12p]\E[0m\n",
82 cur_tstate_tm->ctx->handle);
84 TRACE(" (NOT BINDED TO THREAD)\E[0m\n");
87 // Binded Context State List
89 Ctx_Data *current = NULL;
92 while (current != NULL) {
93 if (cur_tstate_tm->ctx == current) {
94 TRACE(" -> EGLCTX [%12p] : EGLDPY=[%12p] <MC count [%10d]> <Ref [%2d]>\E[0m\n",
101 current = current->next;
107 current = current->next;
111 TRACE("\E[40;33m........................................................................................................................\E[0m\n");
113 // Not-binded Context State List
115 Ctx_Data *current = NULL;
118 while (current != NULL) {
121 General_Trace_List *current_t = NULL;
122 current_t = thread_trace_list;
124 while (current_t != NULL) {
125 GLThreadState *cur_tstate = (GLThreadState *)current_t->value;
126 MY_MODULE_TSTATE *cur_tstate_tm = NULL;
128 GET_MY_TSTATE(cur_tstate_tm, cur_tstate);
129 AST(cur_tstate_tm != NULL);
131 if (cur_tstate_tm->ctx == current) {
135 current_t = current_t->next;
139 TRACE(" EGLCTX [%12p] : EGLDPY=[%12p] <MC count [%10d]> <Ref [%2d]>\E[0m\n",
146 current = current->next;
151 TRACE("\E[40;34m========================================================================================================================\E[0m\n");
160 AST(mutex_unlock(&general_trace_lists_access_mutex) == 1);
161 AST(mutex_unlock(&ctx_access_mutex) == 1);
165 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
169 tracepath_add_context(GLContext ctx, GLDisplay dpy, GLContext share_ctx)
171 Ctx_Data *current = NULL;
172 Ctx_Data *data = NULL;
174 AST(mutex_lock(&ctx_access_mutex) == 1);
178 while (current != NULL) {
179 if (current->handle == ctx) {
183 current = current->next;
187 data = (Ctx_Data *)calloc(1, sizeof(Ctx_Data));
192 data->sostate = _get_sostate(share_ctx);
193 if (data->sostate == NULL) {
194 data->sostate = (Sostate_Data *)calloc(1, sizeof(Sostate_Data));
195 data->sostate->ref_count = 1;
198 if (ctx_data != NULL)
199 data->next = ctx_data;
206 AST(mutex_unlock(&ctx_access_mutex) == 1);
211 tracepath_get_context(GLContext ctx)
213 Ctx_Data *current = NULL;
214 Ctx_Data *data = NULL;
216 AST(mutex_lock(&ctx_access_mutex) == 1);
220 while (current != NULL) {
221 if (current->handle == ctx) {
225 current = current->next;
228 COREGL_WRN("Error making context [%p] current. (invalid EGL context)\n", ctx);
235 AST(mutex_unlock(&ctx_access_mutex) == 1);
240 tracepath_remove_context(GLContext ctx)
242 Ctx_Data *current = NULL;
243 Ctx_Data *prev = NULL;
245 AST(mutex_lock(&ctx_access_mutex) == 1);
249 while (current != NULL) {
250 if (current->handle == ctx) {
251 if (--current->ref_count <= 0) {
253 prev->next = current->next;
255 ctx_data = current->next;
257 if (--current->sostate->ref_count <= 0) {
258 tracepath_glbuf_clear(current->sostate->glbuf_rb);
259 tracepath_glbuf_clear(current->sostate->glbuf_tex);
260 free(current->sostate);
261 current->sostate = NULL;
270 current = current->next;
275 AST(mutex_unlock(&ctx_access_mutex) == 1);
280 tracepath_eglGetError(void)
282 EGLint ret = _COREGL_INT_INIT_VALUE;
284 _COREGL_TRACEPATH_FUNC_BEGIN();
285 ret = _orig_tracepath_eglGetError();
289 _COREGL_TRACEPATH_FUNC_END();
294 tracepath_eglGetDisplay(EGLNativeDisplayType display_id)
296 EGLDisplay ret = EGL_NO_DISPLAY;
298 _COREGL_TRACEPATH_FUNC_BEGIN();
299 ret = _orig_tracepath_eglGetDisplay(display_id);
303 _COREGL_TRACEPATH_FUNC_END();
308 tracepath_eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
310 EGLBoolean ret = EGL_FALSE;
311 _COREGL_TRACEPATH_FUNC_BEGIN();
312 ret = _orig_tracepath_eglInitialize(dpy, major, minor);
316 _COREGL_TRACEPATH_FUNC_END();
321 tracepath_eglTerminate(EGLDisplay dpy)
323 EGLBoolean ret = EGL_FALSE;
325 _COREGL_TRACEPATH_FUNC_BEGIN();
326 ret = _orig_tracepath_eglTerminate(dpy);
330 _COREGL_TRACEPATH_FUNC_END();
335 tracepath_eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size,
338 EGLBoolean ret = EGL_FALSE;
340 _COREGL_TRACEPATH_FUNC_BEGIN();
341 ret = _orig_tracepath_eglGetConfigs(dpy, configs, config_size, num_config);
345 _COREGL_TRACEPATH_FUNC_END();
350 tracepath_eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
351 EGLConfig *configs, EGLint config_size, EGLint *num_config)
353 EGLBoolean ret = EGL_FALSE;
355 _COREGL_TRACEPATH_FUNC_BEGIN();
356 ret = _orig_tracepath_eglChooseConfig(dpy, attrib_list, configs, config_size,
361 _COREGL_TRACEPATH_FUNC_END();
366 tracepath_eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute,
369 EGLBoolean ret = EGL_FALSE;
371 _COREGL_TRACEPATH_FUNC_BEGIN();
372 ret = _orig_tracepath_eglGetConfigAttrib(dpy, config, attribute, value);
376 _COREGL_TRACEPATH_FUNC_END();
382 tracepath_eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
383 EGLNativeWindowType win, const EGLint *attrib_list)
385 EGLSurface ret = EGL_NO_SURFACE;
387 _COREGL_TRACEPATH_FUNC_BEGIN();
388 ret = _orig_tracepath_eglCreateWindowSurface(dpy, config, win, attrib_list);
392 _COREGL_TRACEPATH_FUNC_END();
397 tracepath_eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
398 const EGLint *attrib_list)
400 EGLSurface ret = EGL_NO_SURFACE;
402 _COREGL_TRACEPATH_FUNC_BEGIN();
403 ret = _orig_tracepath_eglCreatePbufferSurface(dpy, config, attrib_list);
407 _COREGL_TRACEPATH_FUNC_END();
412 tracepath_eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
413 EGLNativePixmapType pixmap, const EGLint *attrib_list)
415 EGLSurface ret = EGL_NO_SURFACE;
417 _COREGL_TRACEPATH_FUNC_BEGIN();
418 ret = _orig_tracepath_eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
422 _COREGL_TRACEPATH_FUNC_END();
427 tracepath_eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
429 EGLBoolean ret = EGL_FALSE;
431 _COREGL_TRACEPATH_FUNC_BEGIN();
432 ret = _orig_tracepath_eglDestroySurface(dpy, surface);
436 _COREGL_TRACEPATH_FUNC_END();
437 #ifdef COREGL_TRACEPATH_TRACE_SURFACE_INFO
440 sprintf(name, "EGLSURFACE_%p", surface);
441 tracepath_surface_trace_add(name, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL);
443 #endif // COREGL_TRACEPATH_TRACE_SURFACE_INFO
448 tracepath_eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute,
451 EGLBoolean ret = EGL_FALSE;
453 _COREGL_TRACEPATH_FUNC_BEGIN();
454 ret = _orig_tracepath_eglQuerySurface(dpy, surface, attribute, value);
458 _COREGL_TRACEPATH_FUNC_END();
463 tracepath_eglBindAPI(EGLenum api)
465 EGLBoolean ret = EGL_FALSE;
467 _COREGL_TRACEPATH_FUNC_BEGIN();
468 ret = _orig_tracepath_eglBindAPI(api);
472 _COREGL_TRACEPATH_FUNC_END();
477 tracepath_eglQueryAPI(void)
481 _COREGL_TRACEPATH_FUNC_BEGIN();
482 ret = _orig_tracepath_eglQueryAPI();
486 _COREGL_TRACEPATH_FUNC_END();
491 tracepath_eglWaitClient(void)
493 EGLBoolean ret = EGL_FALSE;
495 _COREGL_TRACEPATH_FUNC_BEGIN();
496 ret = _orig_tracepath_eglWaitClient();
500 _COREGL_TRACEPATH_FUNC_END();
505 tracepath_eglReleaseThread(void)
507 EGLBoolean ret = EGL_FALSE;
509 _COREGL_TRACEPATH_FUNC_BEGIN();
510 ret = _orig_tracepath_eglReleaseThread();
514 _COREGL_TRACEPATH_FUNC_END();
519 tracepath_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype,
520 EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
522 EGLSurface ret = EGL_NO_SURFACE;
524 _COREGL_TRACEPATH_FUNC_BEGIN();
525 ret = _orig_tracepath_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer,
526 config, attrib_list);
530 _COREGL_TRACEPATH_FUNC_END();
535 tracepath_eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute,
538 EGLBoolean ret = EGL_FALSE;
540 _COREGL_TRACEPATH_FUNC_BEGIN();
541 ret = _orig_tracepath_eglSurfaceAttrib(dpy, surface, attribute, value);
545 _COREGL_TRACEPATH_FUNC_END();
550 tracepath_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
552 EGLBoolean ret = EGL_FALSE;
554 _COREGL_TRACEPATH_FUNC_BEGIN();
555 ret = _orig_tracepath_eglBindTexImage(dpy, surface, buffer);
559 _COREGL_TRACEPATH_FUNC_END();
564 tracepath_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
566 EGLBoolean ret = EGL_FALSE;
568 _COREGL_TRACEPATH_FUNC_BEGIN();
569 ret = _orig_tracepath_eglReleaseTexImage(dpy, surface, buffer);
573 _COREGL_TRACEPATH_FUNC_END();
578 tracepath_eglSwapInterval(EGLDisplay dpy, EGLint interval)
580 EGLBoolean ret = EGL_FALSE;
582 _COREGL_TRACEPATH_FUNC_BEGIN();
583 ret = _orig_tracepath_eglSwapInterval(dpy, interval);
587 _COREGL_TRACEPATH_FUNC_END();
592 tracepath_eglCreateContext(EGLDisplay dpy, EGLConfig config,
593 EGLContext share_context, const EGLint *attrib_list)
595 EGLContext ret = EGL_NO_CONTEXT;
597 _COREGL_TRACEPATH_FUNC_BEGIN();
598 ret = _orig_tracepath_eglCreateContext(dpy, config, share_context, attrib_list);
602 _COREGL_TRACEPATH_FUNC_END();
604 if (ret != EGL_NO_CONTEXT) {
605 tracepath_add_context(ret, dpy, share_context);
608 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
609 if (unlikely(trace_ctx_flag == 1)) {
610 if (_orig_tracepath_eglCreateContext == _sym_eglCreateContext) {
612 sprintf(ment, "eglCreateContext completed (EGLCTX=[%12p])", ret);
613 _dump_context_info(ment, 1);
616 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
621 tracepath_eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
623 EGLBoolean ret = EGL_FALSE;
625 _COREGL_TRACEPATH_FUNC_BEGIN();
626 ret = _orig_tracepath_eglDestroyContext(dpy, ctx);
630 _COREGL_TRACEPATH_FUNC_END();
632 AST(ctx != EGL_NO_CONTEXT);
634 tracepath_remove_context(ctx);
636 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
637 if (unlikely(trace_ctx_flag == 1)) {
638 if (_orig_tracepath_eglDestroyContext == _sym_eglDestroyContext) {
640 sprintf(ment, "eglDestroyContext completed (EGLCTX=[%12p])", ctx);
641 _dump_context_info(ment, 1);
644 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
649 tracepath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
652 EGLBoolean ret = EGL_FALSE;
654 _COREGL_TRACEPATH_FUNC_BEGIN();
655 ret = _orig_tracepath_eglMakeCurrent(dpy, draw, read, ctx);
659 _COREGL_TRACEPATH_FUNC_END();
661 MY_MODULE_TSTATE *tstate = NULL;
663 GET_MY_TSTATE(tstate, get_current_thread_state());
664 if (tstate == NULL) {
665 init_new_thread_state();
667 GET_MY_TSTATE(tstate, get_current_thread_state());
671 Ctx_Data *oldctx = tstate->ctx;
673 if (ctx != EGL_NO_CONTEXT) {
674 tstate->ctx = tracepath_get_context(ctx);
675 if (tstate->ctx != NULL)
676 tstate->ctx->mc_count++;
682 tracepath_remove_context(oldctx->handle);
684 tstate->surf_draw = draw;
685 tstate->surf_read = read;
687 #ifdef COREGL_TRACEPATH_TRACE_STATE_INFO
688 if (unlikely(trace_state_flag == 1)) {
689 if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent)
690 tracepath_dump_context_states(0);
692 #endif // COREGL_TRACEPATH_TRACE_STATE_INFO
693 #ifdef COREGL_TRACEPATH_TRACE_CONTEXT_INFO
694 if (unlikely(trace_ctx_flag == 1)) {
695 if (_orig_tracepath_eglMakeCurrent == _sym_eglMakeCurrent) {
697 sprintf(ment, "eglMakeCurrent finished (EGLCTX=[%12p] Surf=[D:%12p R:%12p])",
699 _dump_context_info(ment, 0);
702 #endif // COREGL_TRACEPATH_TRACE_CONTEXT_INFO
707 tracepath_eglGetCurrentContext(void)
709 EGLContext ret = EGL_NO_CONTEXT;
711 _COREGL_TRACEPATH_FUNC_BEGIN();
712 ret = _orig_tracepath_eglGetCurrentContext();
716 _COREGL_TRACEPATH_FUNC_END();
721 tracepath_eglGetCurrentSurface(EGLint readdraw)
723 EGLSurface ret = EGL_NO_SURFACE;
725 _COREGL_TRACEPATH_FUNC_BEGIN();
726 ret = _orig_tracepath_eglGetCurrentSurface(readdraw);
730 _COREGL_TRACEPATH_FUNC_END();
735 tracepath_eglGetCurrentDisplay(void)
737 EGLDisplay ret = EGL_NO_DISPLAY;
739 _COREGL_TRACEPATH_FUNC_BEGIN();
740 ret = _orig_tracepath_eglGetCurrentDisplay();
744 _COREGL_TRACEPATH_FUNC_END();
749 tracepath_eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute,
752 EGLBoolean ret = EGL_FALSE;
754 _COREGL_TRACEPATH_FUNC_BEGIN();
755 ret = _orig_tracepath_eglQueryContext(dpy, ctx, attribute, value);
759 _COREGL_TRACEPATH_FUNC_END();
764 tracepath_eglWaitGL(void)
766 EGLBoolean ret = EGL_FALSE;
768 _COREGL_TRACEPATH_FUNC_BEGIN();
769 ret = _orig_tracepath_eglWaitGL();
771 _COREGL_TRACE_SURFACE(0, 1, "EGLWAITGL");
776 _COREGL_TRACEPATH_FUNC_END();
781 tracepath_eglWaitNative(EGLint engine)
783 EGLBoolean ret = EGL_FALSE;
785 _COREGL_TRACEPATH_FUNC_BEGIN();
786 ret = _orig_tracepath_eglWaitNative(engine);
790 _COREGL_TRACEPATH_FUNC_END();
795 tracepath_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
797 EGLBoolean ret = EGL_FALSE;
799 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
801 _COREGL_TRACEPATH_FUNC_BEGIN();
802 ret = _orig_tracepath_eglSwapBuffers(dpy, surface);
807 _COREGL_TRACEPATH_FUNC_END();
808 if (unlikely(trace_api_frame_flag == 1)) {
809 if (unlikely(trace_api_all_flag == 1)) {
810 _COREGL_TRACE_API_OUTPUT(1);
812 _COREGL_TRACE_API_OUTPUT(0);
814 _COREGL_TRACE_API_RESET_FRAME();
816 _COREGL_TRACE_API_OUTPUT(0);
818 _COREGL_TRACE_MEM_OUTPUT(0);
823 tracepath_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface,
824 EGLint *rects, EGLint n_rects)
826 EGLBoolean ret = EGL_FALSE;
828 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
830 _COREGL_TRACEPATH_FUNC_BEGIN();
831 ret = _orig_tracepath_eglSwapBuffersWithDamageEXT(dpy, surface, rects, n_rects);
836 _COREGL_TRACEPATH_FUNC_END();
837 if (unlikely(trace_api_frame_flag == 1)) {
838 if (unlikely(trace_api_all_flag == 1)) {
839 _COREGL_TRACE_API_OUTPUT(1);
841 _COREGL_TRACE_API_OUTPUT(0);
843 _COREGL_TRACE_API_RESET_FRAME();
845 _COREGL_TRACE_API_OUTPUT(0);
847 _COREGL_TRACE_MEM_OUTPUT(0);
852 tracepath_eglSwapBuffersRegionEXT(EGLDisplay dpy, EGLSurface surface,
853 EGLint numRects, const EGLint *rects)
855 EGLBoolean ret = EGL_FALSE;
857 _COREGL_TRACE_SURFACE(0, 1, "SWAPBUFFERS");
859 _COREGL_TRACEPATH_FUNC_BEGIN();
860 ret = _orig_tracepath_eglSwapBuffersRegionEXT(dpy, surface, numRects, rects);
865 _COREGL_TRACEPATH_FUNC_END();
866 if (unlikely(trace_api_frame_flag == 1)) {
867 if (unlikely(trace_api_all_flag == 1)) {
868 _COREGL_TRACE_API_OUTPUT(1);
870 _COREGL_TRACE_API_OUTPUT(0);
872 _COREGL_TRACE_API_RESET_FRAME();
874 _COREGL_TRACE_API_OUTPUT(0);
876 _COREGL_TRACE_MEM_OUTPUT(0);
881 tracepath_eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
882 EGLNativePixmapType target)
884 EGLBoolean ret = EGL_FALSE;
886 _COREGL_TRACEPATH_FUNC_BEGIN();
887 ret = _orig_tracepath_eglCopyBuffers(dpy, surface, target);
891 _COREGL_TRACEPATH_FUNC_END();
896 tracepath_eglGetProcAddress(const char *procname)
900 _COREGL_TRACEPATH_FUNC_BEGIN();
902 #define _COREGL_SYMBOL(RET_TYPE, FUNC_NAME, PARAM_LIST) \
903 if (strcmp(procname, #FUNC_NAME) == 0) \
905 _eng_fn ret_orig = NULL; \
906 ret_orig = _orig_tracepath_eglGetProcAddress(procname); \
907 if (ret_orig != NULL) \
908 ret = (_eng_fn)ovr_##FUNC_NAME; \
912 #define _COREGL_EXT_SYMBOL_ALIAS(ALIAS_NAME, FUNC_NAME) \
913 if (strcmp(procname, #ALIAS_NAME) == 0) \
915 _eng_fn ret_orig = NULL; \
916 ret_orig = _orig_tracepath_eglGetProcAddress(#ALIAS_NAME); \
917 if (ret_orig != NULL) \
918 ret = (_eng_fn)ovr_##FUNC_NAME; \
922 #include "../../headers/sym_egl.h"
923 #include "../../headers/sym_gl.h"
924 #undef _COREGL_SYMBOL
925 #undef _COREGL_EXT_SYMBOL_ALIAS
927 ret = _orig_tracepath_eglGetProcAddress(procname);
929 COREGL_WRN("\E[40;31;1mTRACEPATH can't support '%s' (tracing for this function will be ignored)\E[0m\n",
936 _COREGL_TRACEPATH_FUNC_END();
941 tracepath_eglQueryString(EGLDisplay dpy, EGLint name)
943 const char *ret = NULL;
945 _COREGL_TRACEPATH_FUNC_BEGIN();
946 ret = _orig_tracepath_eglQueryString(dpy, name);
950 _COREGL_TRACEPATH_FUNC_END();
955 tracepath_eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target,
956 EGLClientBuffer buffer, const EGLint *attrib_list)
960 _COREGL_TRACEPATH_FUNC_BEGIN();
961 ret = _orig_tracepath_eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
965 _COREGL_TRACEPATH_FUNC_END();
970 tracepath_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
972 EGLBoolean ret = EGL_FALSE;
974 _COREGL_TRACEPATH_FUNC_BEGIN();
975 ret = _orig_tracepath_eglDestroyImageKHR(dpy, image);
979 _COREGL_TRACEPATH_FUNC_END();
984 tracepath_eglMapImageSEC(EGLDisplay dpy, EGLImageKHR image, EGLint device_type,
985 EGLint access_option)
989 _COREGL_TRACEPATH_FUNC_BEGIN();
990 ret = _orig_tracepath_eglMapImageSEC(dpy, image, device_type, access_option);
994 _COREGL_TRACEPATH_FUNC_END();
999 tracepath_eglUnmapImageSEC(EGLDisplay dpy, EGLImageKHR image,
1002 EGLBoolean ret = EGL_FALSE;
1004 _COREGL_TRACEPATH_FUNC_BEGIN();
1005 ret = _orig_tracepath_eglUnmapImageSEC(dpy, image, device_type);
1009 _COREGL_TRACEPATH_FUNC_END();
1014 tracepath_eglGetImageAttribSEC(EGLDisplay dpy, EGLImageKHR image,
1015 EGLint attribute, EGLint *value)
1017 EGLBoolean ret = EGL_FALSE;
1019 _COREGL_TRACEPATH_FUNC_BEGIN();
1020 ret = _orig_tracepath_eglGetImageAttribSEC(dpy, image, attribute, value);
1024 _COREGL_TRACEPATH_FUNC_END();
1029 tracepath_eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface,
1030 const EGLint *attrib_list)
1032 EGLBoolean ret = EGL_FALSE;
1034 _COREGL_TRACEPATH_FUNC_BEGIN();
1035 ret = _orig_tracepath_eglLockSurfaceKHR(display, surface, attrib_list);
1039 _COREGL_TRACEPATH_FUNC_END();
1044 tracepath_eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface)
1046 EGLBoolean ret = EGL_FALSE;
1048 _COREGL_TRACEPATH_FUNC_BEGIN();
1049 ret = _orig_tracepath_eglUnlockSurfaceKHR(display, surface);
1053 _COREGL_TRACEPATH_FUNC_END();
1058 tracepath_eglBindWaylandDisplayWL(EGLDisplay dpy, void *display)
1060 EGLBoolean ret = EGL_FALSE;
1062 _COREGL_TRACEPATH_FUNC_BEGIN();
1063 ret = _orig_tracepath_eglBindWaylandDisplayWL(dpy, display);
1068 _COREGL_TRACEPATH_FUNC_END();
1073 tracepath_eglUnbindWaylandDisplayWL(EGLDisplay dpy, void *display)
1075 EGLBoolean ret = EGL_FALSE;
1077 _COREGL_TRACEPATH_FUNC_BEGIN();
1078 ret = _orig_tracepath_eglUnbindWaylandDisplayWL(dpy, display);
1083 _COREGL_TRACEPATH_FUNC_END();
1089 tracepath_eglQueryWaylandBufferWL(EGLDisplay dpy, void *buffer,
1090 EGLint attribute, EGLint *value)
1092 EGLBoolean ret = EGL_FALSE;
1094 _COREGL_TRACEPATH_FUNC_BEGIN();
1095 ret = _orig_tracepath_eglQueryWaylandBufferWL(dpy, buffer, attribute, value);
1100 _COREGL_TRACEPATH_FUNC_END();