Commit 12794e2d by Nicolas Capens

Dispatch EGL entry functions to avoid resolving to the same symbol.

Bug 18752589 Change-Id: I96bbad9ab0593b93b219ec8a769523342497c5da Reviewed-on: https://swiftshader-review.googlesource.com/2910Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 0273322c
...@@ -11,42 +11,42 @@ class LibEGLexports ...@@ -11,42 +11,42 @@ class LibEGLexports
public: public:
LibEGLexports(); LibEGLexports();
EGLint (EGLAPIENTRY *eglGetError)(void); EGLint (*eglGetError)(void);
EGLDisplay (EGLAPIENTRY *eglGetDisplay)(EGLNativeDisplayType display_id); EGLDisplay (*eglGetDisplay)(EGLNativeDisplayType display_id);
EGLBoolean (EGLAPIENTRY *eglInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor); EGLBoolean (*eglInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor);
EGLBoolean (EGLAPIENTRY *eglTerminate)(EGLDisplay dpy); EGLBoolean (*eglTerminate)(EGLDisplay dpy);
const char *(EGLAPIENTRY *eglQueryString)(EGLDisplay dpy, EGLint name); const char *(*eglQueryString)(EGLDisplay dpy, EGLint name);
EGLBoolean (EGLAPIENTRY *eglGetConfigs)(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); EGLBoolean (*eglGetConfigs)(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
EGLBoolean (EGLAPIENTRY *eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); EGLBoolean (*eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
EGLBoolean (EGLAPIENTRY *eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); EGLBoolean (*eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
EGLSurface (EGLAPIENTRY *eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType window, const EGLint *attrib_list); EGLSurface (*eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType window, const EGLint *attrib_list);
EGLSurface (EGLAPIENTRY *eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); EGLSurface (*eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
EGLSurface (EGLAPIENTRY *eglCreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); EGLSurface (*eglCreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
EGLBoolean (EGLAPIENTRY *eglDestroySurface)(EGLDisplay dpy, EGLSurface surface); EGLBoolean (*eglDestroySurface)(EGLDisplay dpy, EGLSurface surface);
EGLBoolean (EGLAPIENTRY *eglQuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); EGLBoolean (*eglQuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
EGLBoolean (EGLAPIENTRY *eglBindAPI)(EGLenum api); EGLBoolean (*eglBindAPI)(EGLenum api);
EGLenum (EGLAPIENTRY *eglQueryAPI)(void); EGLenum (*eglQueryAPI)(void);
EGLBoolean (EGLAPIENTRY *eglWaitClient)(void); EGLBoolean (*eglWaitClient)(void);
EGLBoolean (EGLAPIENTRY *eglReleaseThread)(void); EGLBoolean (*eglReleaseThread)(void);
EGLSurface (EGLAPIENTRY *eglCreatePbufferFromClientBuffer)(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); EGLSurface (*eglCreatePbufferFromClientBuffer)(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
EGLBoolean (EGLAPIENTRY *eglSurfaceAttrib)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); EGLBoolean (*eglSurfaceAttrib)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
EGLBoolean (EGLAPIENTRY *eglBindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); EGLBoolean (*eglBindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLBoolean (EGLAPIENTRY *eglReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); EGLBoolean (*eglReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLBoolean (EGLAPIENTRY *eglSwapInterval)(EGLDisplay dpy, EGLint interval); EGLBoolean (*eglSwapInterval)(EGLDisplay dpy, EGLint interval);
EGLContext (EGLAPIENTRY *eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); EGLContext (*eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
EGLBoolean (EGLAPIENTRY *eglDestroyContext)(EGLDisplay dpy, EGLContext ctx); EGLBoolean (*eglDestroyContext)(EGLDisplay dpy, EGLContext ctx);
EGLBoolean (EGLAPIENTRY *eglMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); EGLBoolean (*eglMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
EGLContext (EGLAPIENTRY *eglGetCurrentContext)(void); EGLContext (*eglGetCurrentContext)(void);
EGLSurface (EGLAPIENTRY *eglGetCurrentSurface)(EGLint readdraw); EGLSurface (*eglGetCurrentSurface)(EGLint readdraw);
EGLDisplay (EGLAPIENTRY *eglGetCurrentDisplay)(void); EGLDisplay (*eglGetCurrentDisplay)(void);
EGLBoolean (EGLAPIENTRY *eglQueryContext)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); EGLBoolean (*eglQueryContext)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
EGLBoolean (EGLAPIENTRY *eglWaitGL)(void); EGLBoolean (*eglWaitGL)(void);
EGLBoolean (EGLAPIENTRY *eglWaitNative)(EGLint engine); EGLBoolean (*eglWaitNative)(EGLint engine);
EGLBoolean (EGLAPIENTRY *eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface); EGLBoolean (*eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface);
EGLBoolean (EGLAPIENTRY *eglCopyBuffers)(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); EGLBoolean (*eglCopyBuffers)(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
EGLImageKHR (EGLAPIENTRY *eglCreateImageKHR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); EGLImageKHR (*eglCreateImageKHR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
EGLBoolean (EGLAPIENTRY *eglDestroyImageKHR)(EGLDisplay dpy, EGLImageKHR image); EGLBoolean (*eglDestroyImageKHR)(EGLDisplay dpy, EGLImageKHR image);
__eglMustCastToProperFunctionPointerType (EGLAPIENTRY *eglGetProcAddress)(const char*); __eglMustCastToProperFunctionPointerType (*eglGetProcAddress)(const char*);
// Functions that don't change the error code, for use by client APIs // Functions that don't change the error code, for use by client APIs
egl::Context *(*clientGetCurrentContext)(); egl::Context *(*clientGetCurrentContext)();
......
...@@ -156,7 +156,7 @@ LibGLES_CMexports::LibGLES_CMexports() ...@@ -156,7 +156,7 @@ LibGLES_CMexports::LibGLES_CMexports()
this->glEGLImageTargetTexture2DOES = ::glEGLImageTargetTexture2DOES; this->glEGLImageTargetTexture2DOES = ::glEGLImageTargetTexture2DOES;
} }
extern "C" LibGLES_CMexports *libGLES_CM_swiftshader() extern "C" GL_API LibGLES_CMexports *libGLES_CM_swiftshader()
{ {
static LibGLES_CMexports libGLES_CM; static LibGLES_CMexports libGLES_CM;
return &libGLES_CM; return &libGLES_CM;
......
...@@ -165,7 +165,7 @@ LibGLESv2exports::LibGLESv2exports() ...@@ -165,7 +165,7 @@ LibGLESv2exports::LibGLESv2exports()
this->createFrameBuffer = ::createFrameBuffer; this->createFrameBuffer = ::createFrameBuffer;
} }
extern "C" LibGLESv2exports *libGLESv2_swiftshader() extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
{ {
static LibGLESv2exports libGLESv2; static LibGLESv2exports libGLESv2;
return &libGLESv2; return &libGLESv2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment