OSDN Git Service

st/egl: Fix build errors in ximage backend after merge.
authorChia-I Wu <olv@lunarg.com>
Wed, 10 Mar 2010 01:48:33 +0000 (09:48 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 10 Mar 2010 01:50:19 +0000 (09:50 +0800)
This fixes assorted merge conflicts when master is merged to
gallium-sw-api-2 in 0c96690a5b6e1c2d114e7ec5f1e9d60a4ff2a330.

src/gallium/state_trackers/egl/x11/native_x11.c
src/gallium/state_trackers/egl/x11/native_x11.h
src/gallium/state_trackers/egl/x11/native_ximage.c

index 2b3edbc..c6eb17a 100644 (file)
@@ -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;
index 21ed6a2..1566524 100644 (file)
@@ -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,
index 7d1462d..544b3b4 100644 (file)
@@ -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) {