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 2b3edbc006a75ce9bd8d4b0f9f1c10822cdfc3f1..c6eb17ab1ac7424f078c0b206a6a4b77e248f6e7 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 21ed6a2e0639933d502f1d88c65303d45333faf8..1566524926a988a01fb86623ee7f9bc8e34e5350 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 7d1462d4b781ac4473f1749e4e1fa768a06ea0c6..544b3b4276e71fcadae9c02241bb4abdf68eb718 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) {