summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl/x11')
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.c2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.h3
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c11
3 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 2b3edbc006..c6eb17ab1a 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 21ed6a2e06..1566524926 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 7d1462d4b7..544b3b4276 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) {