diff options
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 2 | ||||
-rw-r--r-- | src/egl/drivers/xdri/egl_xdri.c | 4 | ||||
-rw-r--r-- | src/egl/main/Makefile | 25 | ||||
-rw-r--r-- | src/egl/main/eglapi.c | 3 | ||||
-rw-r--r-- | src/egl/main/eglapi.h | 2 | ||||
-rw-r--r-- | src/egl/main/eglconfig.c | 1 |
6 files changed, 21 insertions, 16 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index 96292b0e9e8..7c6e8637a1c 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -899,7 +899,7 @@ GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw) * Called from eglGetProcAddress() via drv->API.GetProcAddress(). */ static _EGLProc -GLX_eglGetProcAddress(const char *procname) +GLX_eglGetProcAddress(_EGLDriver *drv, const char *procname) { return (_EGLProc) glXGetProcAddress((const GLubyte *) procname); } diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c index d2affc66dd4..8425b3d11ef 100644 --- a/src/egl/drivers/xdri/egl_xdri.c +++ b/src/egl/drivers/xdri/egl_xdri.c @@ -355,7 +355,7 @@ xdri_eglTerminate(_EGLDriver *drv, _EGLDisplay *dpy) * Called from eglGetProcAddress() via drv->API.GetProcAddress(). */ static _EGLProc -xdri_eglGetProcAddress(const char *procname) +xdri_eglGetProcAddress(_EGLDriver *drv, const char *procname) { /* the symbol is defined in libGL.so */ return (_EGLProc) _glapi_get_proc_address(procname); @@ -562,7 +562,7 @@ xdri_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw) struct xdri_egl_display *xdri_dpy = lookup_display(dpy); struct xdri_egl_surface *xdri_surf = lookup_surface(draw); - xdri_dpy->psc->driScreen->swapBuffers(xdri_surf->driDrawable); + xdri_dpy->psc->driScreen->swapBuffers(xdri_surf->driDrawable, 0, 0, 0); return EGL_TRUE; } diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index c951b070f1f..ec326a845df 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -4,7 +4,10 @@ TOP = ../../.. include $(TOP)/configs/current -INCLUDE_DIRS = -I$(TOP)/include -I$(TOP)/src/mesa/glapi $(X11_INCLUDES) +EGL_MAJOR = 1 +EGL_MINOR = 0 + +INCLUDE_DIRS = -I$(TOP)/include HEADERS = \ eglcompiler.h \ @@ -43,7 +46,7 @@ SOURCES = \ OBJECTS = $(SOURCES:.c=.o) -# Undefined for now +# use dl*() to load drivers LOCAL_CFLAGS = -D_EGL_PLATFORM_X=1 @@ -56,21 +59,21 @@ default: depend library # EGL Library -library: $(TOP)/$(LIB_DIR)/libEGL.so +library: $(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME) -$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS) - $(MKLIB) -o EGL -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -major 1 -minor 0 \ - -install $(TOP)/$(LIB_DIR) \ +$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS) + $(MKLIB) -o $(EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + -major $(EGL_MAJOR) -minor $(EGL_MINOR) \ + -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \ $(EGL_LIB_DEPS) $(OBJECTS) install: default $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(MINSTALL) $(TOP)/$(LIB_DIR)/libEGL.so* $(DESTDIR)$(INSTALL_LIB_DIR) + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(EGL_LIB_GLOB) \ + $(DESTDIR)$(INSTALL_LIB_DIR) clean: - -rm -f *.o *.so* - -rm -f core.* + -rm -f *.o -rm -f depend depend.bak @@ -82,5 +85,5 @@ depend: $(SOURCES) $(HEADERS) $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null -include depend +-include depend # DO NOT DELETE diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 14cc5fa6137..26e0602453a 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -716,7 +716,8 @@ void (* EGLAPIENTRY eglGetProcAddress(const char *procname))() /* now loop over drivers to query their procs */ for (i = 0; i < _eglGlobal.NumDrivers; i++) { - _EGLProc p = _eglGlobal.Drivers[i]->API.GetProcAddress(procname); + _EGLDriver *drv = _eglGlobal.Drivers[i]; + _EGLProc p = drv->API.GetProcAddress(drv, procname); if (p) return p; } diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h index aa0abe3eb6b..080f2155e3a 100644 --- a/src/egl/main/eglapi.h +++ b/src/egl/main/eglapi.h @@ -44,7 +44,7 @@ typedef const char *(*QueryString_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint n typedef EGLBoolean (*WaitClient_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx); typedef EGLBoolean (*WaitNative_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine); -typedef _EGLProc (*GetProcAddress_t)(const char *procname); +typedef _EGLProc (*GetProcAddress_t)(_EGLDriver *drv, const char *procname); diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index 31d69a77080..4d149603ae5 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -324,6 +324,7 @@ _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching) mask = EGL_PBUFFER_BIT | EGL_PIXMAP_BIT | EGL_WINDOW_BIT | + EGL_SCREEN_BIT_MESA | /* XXX should check the extension */ EGL_VG_COLORSPACE_LINEAR_BIT | EGL_VG_ALPHA_FORMAT_PRE_BIT | EGL_MULTISAMPLE_RESOLVE_BOX_BIT | |