summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/Makefile25
-rw-r--r--src/egl/main/eglapi.c3
-rw-r--r--src/egl/main/eglapi.h2
-rw-r--r--src/egl/main/eglcompiler.h10
-rw-r--r--src/egl/main/eglconfig.c1
-rw-r--r--src/egl/main/eglconfig.h14
-rw-r--r--src/egl/main/eglconfigutil.h6
-rw-r--r--src/egl/main/eglcontext.h4
-rw-r--r--src/egl/main/eglcurrent.h10
-rw-r--r--src/egl/main/egldisplay.h4
-rw-r--r--src/egl/main/egldriver.h7
-rw-r--r--src/egl/main/egllog.h6
-rw-r--r--src/egl/main/eglmode.h2
-rw-r--r--src/egl/main/eglscreen.h6
-rw-r--r--src/egl/main/eglsurface.h2
15 files changed, 59 insertions, 43 deletions
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/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);