Based on zhigang gong <zhigang.gong@gmail.com>'s patch.
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_image *dri2_img;
- GLuint renderbuffer = (GLuint) buffer;
+ GLuint renderbuffer = (GLuint) (uintptr_t) buffer;
if (renderbuffer == 0) {
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
(void) ctx;
- name = (EGLint) buffer;
+ name = (EGLint) (uintptr_t) buffer;
err = _eglParseImageAttribList(&attrs, disp, attr_list);
if (err != EGL_SUCCESS)
memset(dri2_dpy, 0, sizeof *dri2_dpy);
disp->DriverData = (void *) dri2_dpy;
- dri2_dpy->fd = (int) disp->PlatformDisplay;
+ dri2_dpy->fd = (int) (intptr_t) disp->PlatformDisplay;
dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
if (dri2_dpy->driver_name == NULL)
(void) ctx;
- drawable = (xcb_drawable_t) buffer;
+ drawable = (xcb_drawable_t) (uintptr_t) buffer;
xcb_dri2_create_drawable (dri2_dpy->conn, drawable);
attachments[0] = XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT;
buffers_cookie =
EGLDisplay EGLAPIENTRY
eglGetDRMDisplayMESA(int fd)
{
- _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) fd);
+ _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) (intptr_t) fd);
return _eglGetDisplayHandle(dpy);
}