diff options
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri/egldri.c | 26 | ||||
-rw-r--r-- | src/egl/main/Makefile | 25 | ||||
-rw-r--r-- | src/egl/main/eglcompiler.h | 10 | ||||
-rw-r--r-- | src/egl/main/eglconfig.c | 1 | ||||
-rw-r--r-- | src/egl/main/eglconfig.h | 14 | ||||
-rw-r--r-- | src/egl/main/eglconfigutil.h | 6 | ||||
-rw-r--r-- | src/egl/main/eglcontext.h | 4 | ||||
-rw-r--r-- | src/egl/main/eglcurrent.h | 10 | ||||
-rw-r--r-- | src/egl/main/egldisplay.h | 4 | ||||
-rw-r--r-- | src/egl/main/egldriver.h | 7 | ||||
-rw-r--r-- | src/egl/main/egllog.h | 6 | ||||
-rw-r--r-- | src/egl/main/eglmode.h | 2 | ||||
-rw-r--r-- | src/egl/main/eglscreen.h | 6 | ||||
-rw-r--r-- | src/egl/main/eglsurface.h | 2 |
14 files changed, 69 insertions, 54 deletions
diff --git a/src/egl/drivers/dri/egldri.c b/src/egl/drivers/dri/egldri.c index 9e400be6248..ca6821dad06 100644 --- a/src/egl/drivers/dri/egldri.c +++ b/src/egl/drivers/dri/egldri.c @@ -675,13 +675,13 @@ __eglCreateContextWithConfig(__DRInativeDisplay* ndpy, int screen, drm_context_t * hHWContext) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateContext(psp->fd, hHWContext)) { _eglLog(_EGL_WARNING, "drmCreateContext failed."); @@ -691,14 +691,14 @@ __eglCreateContextWithConfig(__DRInativeDisplay* ndpy, int screen, } #if 0 __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __glXFindDRIScreen(dpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateContext(psp->fd, hHWContext)) { @@ -716,13 +716,13 @@ static GLboolean __eglDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) drmDestroyContext(psp->fd, context); @@ -735,13 +735,13 @@ __eglCreateDrawable(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, drm_drawable_t * hHWDrawable) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateDrawable(psp->fd, hHWDrawable)) { _eglLog(_EGL_WARNING, "drmCreateDrawable failed."); @@ -756,13 +756,13 @@ static GLboolean __eglDestroyDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) drmDestroyDrawable(psp->fd, drawable); @@ -778,7 +778,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; driSurface *surf = Lookup_driSurface((EGLSurface) drawable); pDRIScreen = __eglFindDRIScreen(ndpy, screen); @@ -786,7 +786,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; *X = 0; *Y = 0; *W = surf->Base.Width; @@ -807,7 +807,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, GLXDrawable drawable = (GLXDrawable) draw; drm_clip_rect_t * cliprect; Display* display = (Display*)dpy; - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; + __DRIcontext *pcp = (__DRIcontext *)CurrentContext->driContext.private; if (drawable == 0) { return GL_FALSE; } 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/eglcompiler.h b/src/egl/main/eglcompiler.h index 6b639b75c66..f7c93f14ce2 100644 --- a/src/egl/main/eglcompiler.h +++ b/src/egl/main/eglcompiler.h @@ -61,4 +61,14 @@ #endif +/** + * Function visibility + */ +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define PUBLIC __attribute__((visibility("default"))) +#else +# define PUBLIC +#endif + + #endif /* EGLCOMPILER_INCLUDED */ 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 | diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h index 6b8a259984e..799bf4ee242 100644 --- a/src/egl/main/eglconfig.h +++ b/src/egl/main/eglconfig.h @@ -91,11 +91,11 @@ _eglSetConfigAttrib(_EGLConfig *conf, EGLint attr, EGLint val) } -extern void +PUBLIC void _eglInitConfig(_EGLConfig *config, EGLint id); -extern EGLConfig +PUBLIC EGLConfig _eglAddConfig(_EGLDisplay *dpy, _EGLConfig *conf); @@ -144,24 +144,24 @@ _eglGetConfigHandle(_EGLConfig *conf) } -extern EGLBoolean +PUBLIC EGLBoolean _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching); -extern EGLBoolean +PUBLIC EGLBoolean _eglMatchConfig(const _EGLConfig *conf, const _EGLConfig *criteria); -extern EGLBoolean +PUBLIC EGLBoolean _eglParseConfigAttribList(_EGLConfig *conf, const EGLint *attrib_list); -extern EGLint +PUBLIC EGLint _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2, const _EGLConfig *criteria, EGLBoolean compare_id); -extern void +PUBLIC void _eglSortConfigs(const _EGLConfig **configs, EGLint count, EGLint (*compare)(const _EGLConfig *, const _EGLConfig *, void *), diff --git a/src/egl/main/eglconfigutil.h b/src/egl/main/eglconfigutil.h index 8c923ee206a..9f8906dedb6 100644 --- a/src/egl/main/eglconfigutil.h +++ b/src/egl/main/eglconfigutil.h @@ -7,16 +7,16 @@ #include "eglconfig.h" -extern void +PUBLIC void _eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode); -extern EGLBoolean +PUBLIC EGLBoolean _eglConfigFromContextModesRec(_EGLConfig *conf, const __GLcontextModes *m, EGLint conformant, EGLint renderable_type); -extern EGLBoolean +PUBLIC EGLBoolean _eglFillInConfigs( _EGLConfig *configs, EGLenum fb_format, EGLenum fb_type, const uint8_t * depth_bits, const uint8_t * stencil_bits, diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h index 45c7b4717b7..cb9e3f4a892 100644 --- a/src/egl/main/eglcontext.h +++ b/src/egl/main/eglcontext.h @@ -30,7 +30,7 @@ struct _egl_context }; -extern EGLBoolean +PUBLIC EGLBoolean _eglInitContext(_EGLDriver *drv, _EGLContext *ctx, _EGLConfig *config, const EGLint *attrib_list); @@ -47,7 +47,7 @@ extern EGLBoolean _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value); -extern EGLBoolean +PUBLIC EGLBoolean _eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx); diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h index 9503e0aba08..c4478b38914 100644 --- a/src/egl/main/eglcurrent.h +++ b/src/egl/main/eglcurrent.h @@ -60,7 +60,7 @@ _eglConvertApiFromIndex(EGLint idx) } -extern _EGLThreadInfo * +PUBLIC _EGLThreadInfo * _eglGetCurrentThread(void); @@ -72,19 +72,19 @@ extern EGLBoolean _eglIsCurrentThreadDummy(void); -extern _EGLContext * +PUBLIC _EGLContext * _eglGetCurrentContext(void); -extern _EGLDisplay * +PUBLIC _EGLDisplay * _eglGetCurrentDisplay(void); -extern _EGLSurface * +PUBLIC _EGLSurface * _eglGetCurrentSurface(EGLint readdraw); -extern EGLBoolean +PUBLIC EGLBoolean _eglError(EGLint errCode, const char *msg); diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index ea4e35a8b3f..4f619e53710 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -78,11 +78,11 @@ extern _EGLDisplay * _eglFindDisplay(NativeDisplayType nativeDisplay); -extern void +PUBLIC void _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *dpy); -extern void +PUBLIC void _eglCleanupDisplay(_EGLDisplay *disp); diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 6c848eb35ea..59bd1954aa8 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -25,7 +25,8 @@ struct _egl_driver }; -extern _EGLDriver *_eglMain(const char *args); +PUBLIC _EGLDriver * +_eglMain(const char *args); extern const char * @@ -48,11 +49,11 @@ extern _EGLDriver * _eglLookupDriver(EGLDisplay d); -extern void +PUBLIC void _eglInitDriverFallbacks(_EGLDriver *drv); -extern EGLint +PUBLIC EGLint _eglFindAPIs(void); diff --git a/src/egl/main/egllog.h b/src/egl/main/egllog.h index 83c8bb72a6e..3a99bfea4b7 100644 --- a/src/egl/main/egllog.h +++ b/src/egl/main/egllog.h @@ -12,15 +12,15 @@ typedef void (*_EGLLogProc)(EGLint level, const char *msg); -extern void +PUBLIC void _eglSetLogProc(_EGLLogProc logger); -extern void +PUBLIC void _eglSetLogLevel(EGLint level); -extern void +PUBLIC void _eglLog(EGLint level, const char *fmtStr, ...); diff --git a/src/egl/main/eglmode.h b/src/egl/main/eglmode.h index af7c2c56d33..a089a5e1943 100644 --- a/src/egl/main/eglmode.h +++ b/src/egl/main/eglmode.h @@ -29,7 +29,7 @@ extern _EGLMode * _eglLookupMode(EGLModeMESA mode, _EGLDisplay *dpy); -extern _EGLMode * +PUBLIC _EGLMode * _eglAddNewMode(_EGLScreen *screen, EGLint width, EGLint height, EGLint refreshRate, const char *name); diff --git a/src/egl/main/eglscreen.h b/src/egl/main/eglscreen.h index 8860a2aa7f6..d52e5388c34 100644 --- a/src/egl/main/eglscreen.h +++ b/src/egl/main/eglscreen.h @@ -30,7 +30,7 @@ extern EGLScreenMESA _eglAllocScreenHandle(void); -extern void +PUBLIC void _eglInitScreen(_EGLScreen *screen); @@ -38,7 +38,7 @@ extern _EGLScreen * _eglLookupScreen(EGLScreenMESA screen, _EGLDisplay *dpy); -extern void +PUBLIC void _eglAddScreen(_EGLDisplay *display, _EGLScreen *screen); @@ -83,7 +83,7 @@ extern void _eglDestroyScreenModes(_EGLScreen *scrn); -extern void +PUBLIC void _eglDestroyScreen(_EGLScreen *scrn); diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index b75fa9c3686..dacdf7e63ce 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -40,7 +40,7 @@ struct _egl_surface }; -extern EGLBoolean +PUBLIC EGLBoolean _eglInitSurface(_EGLDriver *drv, _EGLSurface *surf, EGLint type, _EGLConfig *config, const EGLint *attrib_list); |