summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/common/egl_g3d_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl/common/egl_g3d_api.c')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index 46a3245..b19d899 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -315,11 +315,15 @@ egl_g3d_create_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
static _EGLSurface *
egl_g3d_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLConfig *conf, EGLNativeWindowType win,
+ _EGLConfig *conf, void *native_window,
const EGLint *attribs)
{
+ EGLNativeWindowType win;
struct egl_g3d_create_surface_arg arg;
+ STATIC_ASSERT(sizeof(EGLNativeWindowType) == sizeof(native_window));
+ win = (EGLNativeWindowType) native_window;
+
memset(&arg, 0, sizeof(arg));
arg.type = EGL_WINDOW_BIT;
arg.u.win = win;
@@ -329,11 +333,15 @@ egl_g3d_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy,
static _EGLSurface *
egl_g3d_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLConfig *conf, EGLNativePixmapType pix,
+ _EGLConfig *conf, void *native_pixmap,
const EGLint *attribs)
{
+ EGLNativePixmapType pix;
struct egl_g3d_create_surface_arg arg;
+ STATIC_ASSERT(sizeof(EGLNativePixmapType) == sizeof(native_pixmap));
+ pix = (EGLNativePixmapType) native_pixmap;
+
memset(&arg, 0, sizeof(arg));
arg.type = EGL_PIXMAP_BIT;
arg.u.pix = pix;
@@ -634,11 +642,15 @@ egl_g3d_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
static EGLBoolean
egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
- EGLNativePixmapType target)
+ void *native_pixmap_target)
{
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
struct egl_g3d_surface *gsurf = egl_g3d_surface(surf);
_EGLContext *ctx = _eglGetCurrentContext();
+ EGLNativePixmapType target;
+
+ STATIC_ASSERT(sizeof(EGLNativePixmapType) == sizeof(native_pixmap_target));
+ target = (EGLNativePixmapType) native_pixmap_target;
if (!gsurf->render_texture)
return EGL_TRUE;