#define COREGL_INTERNAL_H
#include <stdio.h>
+#include <stdint.h>
#include "coregl.h"
extern int trace_surface_filter_period_begin;
extern int trace_surface_filter_period_end;
extern int trace_surface_filter_type;
-extern int trace_surface_filter_handle;
+extern uintptr_t trace_surface_filter_handle;
extern int trace_surface_filter_size_w;
extern int trace_surface_filter_size_h;
extern int trace_surface_print_only_flag;
int trace_surface_filter_period_begin = 0;
int trace_surface_filter_period_end = 0;
int trace_surface_filter_type = 0;
-int trace_surface_filter_handle = 0;
+uintptr_t trace_surface_filter_handle = 0;
int trace_surface_filter_size_w = 0;
int trace_surface_filter_size_h = 0;
int trace_surface_print_only_flag = 0;
{
void *ret = NULL;
EGLContext real_ctx = EGL_NO_CONTEXT;
- GLuint real_obj = 0;
+ EGLClientBuffer real_obj;
_COREGL_FASTPATH_FUNC_BEGIN();
case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR:
case EGL_GL_TEXTURE_3D_KHR:
case EGL_GL_RENDERBUFFER_KHR:
- if ((GLuint )buffer == 0) {
+ if (buffer == NULL) {
COREGL_ERR("\E[40;31;1m fastpath_eglCreateImageKHR buffer object NULL \E[0m\n");
- real_obj = 0;
+ real_obj = NULL;
} else {
- real_obj = fastpath_ostate_get_object(&gctx->ostate, GL_OBJECT_TYPE_TEXTURE,
- (GLuint )buffer);
+ real_obj = (EGLClientBuffer)(uintptr_t)fastpath_ostate_get_object(&gctx->ostate,
+ GL_OBJECT_TYPE_TEXTURE,
+ (GLuint)(uintptr_t)buffer);
}
break;
default:
}
} else {
- real_obj = (GLuint )buffer;
+ real_obj = buffer;
}
- ret = _orig_fastpath_eglCreateImageKHR(dpy, real_ctx, target,
- (EGLClientBuffer)real_obj, attrib_list);
+ ret = _orig_fastpath_eglCreateImageKHR(dpy, real_ctx, target, real_obj,
+ attrib_list);
goto finish;
}
}
} else {
- trace_surface_filter_handle = atoi(tmp);
+ trace_surface_filter_handle = (uintptr_t)atol(tmp);
}
}
if (trace_surface_filter_type == 2)
COREGL_LOG("\E[40;36;1m(SURFACE-TYPE:FBO)\E[0m ");
if (trace_surface_filter_handle != 0)
- COREGL_LOG("\E[40;36;1m(SURFACE-HANDLE:0x%x(%d))\E[0m ",
- trace_surface_filter_handle, trace_surface_filter_handle);
+ COREGL_LOG("\E[40;36;1m(SURFACE-HANDLE:%p(%ld))\E[0m ",
+ (void *)trace_surface_filter_handle, (long int)trace_surface_filter_handle);
if (trace_surface_filter_size_w > 0 && trace_surface_filter_size_h > 0)
COREGL_LOG("\E[40;36;1m(SURFACE-SIZE:%dx%d)\E[0m ", trace_surface_filter_size_w,
trace_surface_filter_size_h);
trace_surface_filter_type != 1) goto finish;;
if (trace_surface_filter_handle != 0 &&
- trace_surface_filter_handle != (int)sdata->surface) goto finish;
+ trace_surface_filter_handle != (uintptr_t)sdata->surface) goto finish;
EGLConfig eglconfig;
GLint asize, rsize, gsize, bsize;
trace_surface_filter_type != 2) goto finish;
if (trace_surface_filter_handle != 0 &&
- trace_surface_filter_handle != sdata->tex &&
- trace_surface_filter_handle != sdata->rb) goto finish;
+ trace_surface_filter_handle != (uintptr_t)sdata->tex &&
+ trace_surface_filter_handle != (uintptr_t)sdata->rb) goto finish;
GLint oldfb;
_orig_tracepath_glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldfb);