From a0e510320009766faa5ff8c0ed744e87f8095df7 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Wed, 22 Sep 2010 07:44:59 +0200 Subject: glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build The Gallium EGL state tracker reuses dri2.c but not the GLX code. Currently there is a bit of code in dri2.c that is incorrectly tied to GLX: instead, make it call an helper that both GLX and Gallium EGL implement, like dri2InvalidateBuffers. This avoids a link error complaining that dri2GetGlxDrawableFromXDrawableId is undefined. Note that we might want to move the whole event translation elsewhere, and probably stop using non-XCB DRI2 altogether, but this seems to be the minimal fix. --- src/gallium/state_trackers/egl/x11/x11_screen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gallium/state_trackers/egl/x11') diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.c b/src/gallium/state_trackers/egl/x11/x11_screen.c index c07ebb7ef6..c919b79eac 100644 --- a/src/gallium/state_trackers/egl/x11/x11_screen.c +++ b/src/gallium/state_trackers/egl/x11/x11_screen.c @@ -432,4 +432,15 @@ dri2InvalidateBuffers(Display *dpy, XID drawable) xscr->dri_invalidate_buffers(xscr, drawable, xscr->dri_user_data); } +extern unsigned +dri2GetSwapEventType(Display *dpy, XID drawable); + +/** + * This is also called from src/glx/dri2.c. + */ +unsigned dri2GetSwapEventType(Display *dpy, XID drawable) +{ + return 0; +} + #endif /* GLX_DIRECT_RENDERING */ -- cgit v1.2.3