From: Chia-I Wu Date: Wed, 10 Mar 2010 01:48:33 +0000 (+0800) Subject: st/egl: Fix build errors in ximage backend after merge. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f92cf55e1d19864a51e620a14c6912e94cd14ea;p=mesa.git st/egl: Fix build errors in ximage backend after merge. This fixes assorted merge conflicts when master is merged to gallium-sw-api-2 in 0c96690a5b6e1c2d114e7ec5f1e9d60a4ff2a330. --- diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c index 2b3edbc006a..c6eb17ab1ac 100644 --- a/src/gallium/state_trackers/egl/x11/native_x11.c +++ b/src/gallium/state_trackers/egl/x11/native_x11.c @@ -144,7 +144,7 @@ native_create_display(EGLNativeDisplayType dpy, EGLint level = (force_sw) ? _EGL_INFO : _EGL_WARNING; _eglLog(level, "use software fallback"); - ndpy = x11_create_ximage_display(dpy); + ndpy = x11_create_ximage_display(dpy, event_handler); } return ndpy; diff --git a/src/gallium/state_trackers/egl/x11/native_x11.h b/src/gallium/state_trackers/egl/x11/native_x11.h index 21ed6a2e063..1566524926a 100644 --- a/src/gallium/state_trackers/egl/x11/native_x11.h +++ b/src/gallium/state_trackers/egl/x11/native_x11.h @@ -29,7 +29,8 @@ #include "common/native.h" struct native_display * -x11_create_ximage_display(EGLNativeDisplayType dpy); +x11_create_ximage_display(EGLNativeDisplayType dpy, + struct native_event_handler *event_handler); struct native_display * x11_create_dri2_display(EGLNativeDisplayType dpy, diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c index 7d1462d4b78..544b3b4276e 100644 --- a/src/gallium/state_trackers/egl/x11/native_ximage.c +++ b/src/gallium/state_trackers/egl/x11/native_ximage.c @@ -51,11 +51,11 @@ struct ximage_display { Display *dpy; boolean own_dpy; + struct native_event_handler *event_handler; + struct x11_screen *xscr; int xscr_number; - struct xm_driver *driver; - struct ximage_config *configs; int num_configs; }; @@ -138,7 +138,7 @@ ximage_surface_alloc_buffer(struct native_surface *nsurf, switch (which) { case NATIVE_ATTACHMENT_FRONT_LEFT: case NATIVE_ATTACHMENT_FRONT_RIGHT: - templ.tex_usage |= PIPE_TEXTURE_USAGE_PRIMARY; + templ.tex_usage |= PIPE_TEXTURE_USAGE_SCANOUT; break; case NATIVE_ATTACHMENT_BACK_LEFT: case NATIVE_ATTACHMENT_BACK_RIGHT: @@ -615,7 +615,8 @@ ximage_display_destroy(struct native_display *ndpy) } struct native_display * -x11_create_ximage_display(EGLNativeDisplayType dpy) +x11_create_ximage_display(EGLNativeDisplayType dpy, + struct native_event_handler *event_handler) { struct ximage_display *xdpy; @@ -633,6 +634,8 @@ x11_create_ximage_display(EGLNativeDisplayType dpy) xdpy->own_dpy = TRUE; } + xdpy->event_handler = event_handler; + xdpy->xscr_number = DefaultScreen(xdpy->dpy); xdpy->xscr = x11_screen_create(xdpy->dpy, xdpy->xscr_number); if (!xdpy->xscr) {