Hello community, here is the log from the commit of package libglvnd for openSUSE:Factory checked in at 2017-06-28 10:33:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libglvnd (Old) and /work/SRC/openSUSE:Factory/.libglvnd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libglvnd" Wed Jun 28 10:33:53 2017 rev:6 rq:505574 version:0.1.2~20170620~d850cdd Changes: -------- --- /work/SRC/openSUSE:Factory/libglvnd/libglvnd.changes 2017-06-10 17:50:27.480427524 +0200 +++ /work/SRC/openSUSE:Factory/.libglvnd.new/libglvnd.changes 2017-06-28 10:33:56.819235071 +0200 @@ -1,0 +2,14 @@ +Wed Jun 21 14:48:46 UTC 2017 - [email protected] + +- Update to version 0.1.2~20170620~d850cdd: + * EGL: detect platform gbm vendor capability. + * EGL: add platform gbm detection in eglGetDisplay. + * EGL: alias "drm" to gbm when using EGL_PLATFORM. + * EGL: honour eglGetPlatformDisplay's attrib_list. + * PPC64LE: Fix the cache clear instructions (boo#1045185). + * configure: Remove AC_PROG_CXX. + * EGL: Allow vendor libraries to identify platforms for + eglGetDisplay. + * GL: Use a table to look up core GLX functions. + +------------------------------------------------------------------- Old: ---- libglvnd-0.1.2~20170427~6bcecd8.tar.gz New: ---- libglvnd-0.1.2~20170620~d850cdd.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libglvnd.spec ++++++ --- /var/tmp/diff_new_pack.83RXrA/_old 2017-06-28 10:33:57.367157553 +0200 +++ /var/tmp/diff_new_pack.83RXrA/_new 2017-06-28 10:33:57.367157553 +0200 @@ -20,7 +20,7 @@ # Name: libglvnd -Version: 0.1.2~20170427~6bcecd8 +Version: 0.1.2~20170620~d850cdd Release: 0 Summary: The GL Vendor-Neutral Dispatch library License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.83RXrA/_old 2017-06-28 10:33:57.411151329 +0200 +++ /var/tmp/diff_new_pack.83RXrA/_new 2017-06-28 10:33:57.411151329 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/NVIDIA/libglvnd.git</param> - <param name="changesrevision">6bcecd8f330f92e8033819f9c99e87e4e7519eb1</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">d850cdde46dd0633405e758fbee49119e384b639</param></service></servicedata> \ No newline at end of file ++++++ libglvnd-0.1.2~20170427~6bcecd8.tar.gz -> libglvnd-0.1.2~20170620~d850cdd.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/configure.ac new/libglvnd-0.1.2~20170620~d850cdd/configure.ac --- old/libglvnd-0.1.2~20170427~6bcecd8/configure.ac 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/configure.ac 2017-06-20 20:53:54.000000000 +0200 @@ -19,8 +19,6 @@ AM_SILENT_RULES([yes]) dnl Checks for programs. -AC_PROG_CXX - AC_PROG_CC AC_PROG_CC_C99 AM_PROG_AS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/include/glvnd/libeglabi.h new/libglvnd-0.1.2~20170620~d850cdd/include/glvnd/libeglabi.h --- old/libglvnd-0.1.2~20170427~6bcecd8/include/glvnd/libeglabi.h 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/include/glvnd/libeglabi.h 2017-06-20 20:53:54.000000000 +0200 @@ -86,7 +86,7 @@ * will still work. */ #define EGL_VENDOR_ABI_MAJOR_VERSION ((uint32_t) 0) -#define EGL_VENDOR_ABI_MINOR_VERSION ((uint32_t) 0) +#define EGL_VENDOR_ABI_MINOR_VERSION ((uint32_t) 1) #define EGL_VENDOR_ABI_VERSION ((EGL_VENDOR_ABI_MAJOR_VERSION << 16) | EGL_VENDOR_ABI_MINOR_VERSION) static inline uint32_t EGL_VENDOR_ABI_GET_MAJOR_VERSION(uint32_t version) { @@ -388,6 +388,30 @@ */ void (*patchThreadAttach)(void); + /*! + * (OPTIONAL) Tries to determine the platform type for a native display. + * + * If the vendor library provides this function, then libglvnd will call it + * to determine which platform to use for a native display handle in + * eglGetDisplay. + * + * If no vendor library identifies the platform, then libglvnd will fall + * back to its own platform detection logic. + * + * Libglvnd can call this function for any native display handle except + * \c EGL_DEFAULT_DISPLAY. + * + * No matter what the value of \p native_display, the vendor library must + * not crash, and must not return a false match. If the vendor library + * can't identify the display, then it must return \c EGL_NONE. + * + * In particular, that means that a vendor library must not return any sort + * of default or fallback platform. + * + * \param native_display The native display handle passed to eglGetDisplay. + * \return Either a platform type enum or EGL_NONE. + */ + EGLenum (* findNativeDisplayPlatform) (void *native_display); } __EGLapiImports; /*****************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libegl.c new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libegl.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libegl.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libegl.c 2017-06-20 20:53:54.000000000 +0200 @@ -102,6 +102,7 @@ { EGL_PLATFORM_WAYLAND_KHR, "wayland" }, { EGL_PLATFORM_ANDROID_KHR, "android" }, { EGL_PLATFORM_GBM_KHR, "gbm" }, + { EGL_PLATFORM_GBM_KHR, "drm" }, { EGL_PLATFORM_DEVICE_EXT, "device" }, { EGL_NONE, NULL } }; @@ -155,6 +156,18 @@ return NULL; } +static EGLBoolean IsGbmDisplay(void *native_display) +{ + void *first_pointer = SafeDereference(native_display); + Dl_info info; + + if (dladdr(first_pointer, &info) == 0) { + return EGL_FALSE; + } + + return !strcmp(info.dli_sname, "gbm_create_device"); +} + static EGLBoolean IsX11Display(void *dpy) { void *alloc; @@ -193,18 +206,32 @@ */ static EGLenum GuessPlatformType(EGLNativeDisplayType display_id) { + EGLBoolean gbmSupported = EGL_FALSE; EGLBoolean waylandSupported = EGL_FALSE; EGLBoolean x11Supported = EGL_FALSE; struct glvnd_list *vendorList = __eglLoadVendors(); __EGLvendorInfo *vendor; - // First, see if this is a valid EGLDisplayEXT handle. + // First, see if any of the vendor libraries can identify the display. + glvnd_list_for_each_entry(vendor, vendorList, entry) { + if (vendor->eglvc.findNativeDisplayPlatform != NULL) { + EGLenum platform = vendor->eglvc.findNativeDisplayPlatform((void *) display_id); + if (platform != EGL_NONE) { + return platform; + } + } + } + + // Next, see if this is a valid EGLDisplayEXT handle. if (__eglGetVendorFromDevice((EGLDeviceEXT) display_id)) { return EGL_PLATFORM_DEVICE_EXT; } // Check if any vendor supports EGL_KHR_platform_wayland. glvnd_list_for_each_entry(vendor, vendorList, entry) { + if (vendor->supportsPlatformGbm) { + gbmSupported = EGL_TRUE; + } if (vendor->supportsPlatformWayland) { waylandSupported = EGL_TRUE; } @@ -213,6 +240,9 @@ } } + if (gbmSupported && IsGbmDisplay(display_id)) { + return EGL_PLATFORM_GBM_KHR; + } if (waylandSupported && IsWaylandDisplay(display_id)) { return EGL_PLATFORM_WAYLAND_KHR; } @@ -371,7 +401,7 @@ return EGL_NO_DISPLAY; } - return GetPlatformDisplayCommon(platform, native_display, NULL, "eglGetPlatformDisplay"); + return GetPlatformDisplayCommon(platform, native_display, attrib_list, "eglGetPlatformDisplay"); } EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libeglvendor.c new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libeglvendor.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libeglvendor.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libeglvendor.c 2017-06-20 20:53:54.000000000 +0200 @@ -369,6 +369,8 @@ static const char NAME_DEVICE_BASE[] = "EGL_EXT_device_base"; static const char NAME_DEVICE_ENUM[] = "EGL_EXT_device_enumeration"; static const char NAME_PLATFORM_DEVICE[] = "EGL_EXT_platform_device"; + static const char NAME_MESA_PLATFORM_GBM[] = "EGL_MESA_platform_gbm"; + static const char NAME_KHR_PLATFORM_GBM[] = "EGL_KHR_platform_gbm"; static const char NAME_EXT_PLATFORM_WAYLAND[] = "EGL_EXT_platform_wayland"; static const char NAME_KHR_PLATFORM_WAYLAND[] = "EGL_KHR_platform_wayland"; static const char NAME_EXT_PLATFORM_X11[] = "EGL_EXT_platform_x11"; @@ -391,6 +393,13 @@ } } + if (!vendor->supportsPlatformGbm) { + if (IsTokenInString(str, NAME_MESA_PLATFORM_GBM, sizeof(NAME_MESA_PLATFORM_GBM) - 1, " ") + || IsTokenInString(str, NAME_KHR_PLATFORM_GBM, sizeof(NAME_KHR_PLATFORM_GBM) - 1, " ")) { + vendor->supportsPlatformGbm = EGL_TRUE; + } + } + if (!vendor->supportsPlatformWayland) { if (IsTokenInString(str, NAME_EXT_PLATFORM_WAYLAND, sizeof(NAME_EXT_PLATFORM_WAYLAND) - 1, " ") || IsTokenInString(str, NAME_KHR_PLATFORM_WAYLAND, sizeof(NAME_KHR_PLATFORM_WAYLAND) - 1, " ")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libeglvendor.h new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libeglvendor.h --- old/libglvnd-0.1.2~20170427~6bcecd8/src/EGL/libeglvendor.h 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/EGL/libeglvendor.h 2017-06-20 20:53:54.000000000 +0200 @@ -31,6 +31,7 @@ EGLBoolean supportsDevice; EGLBoolean supportsPlatformDevice; + EGLBoolean supportsPlatformGbm; EGLBoolean supportsPlatformX11; EGLBoolean supportsPlatformWayland; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/Makefile.am new/libglvnd-0.1.2~20170620~d850cdd/src/GL/Makefile.am --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/Makefile.am 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GL/Makefile.am 2017-06-20 20:53:54.000000000 +0200 @@ -32,7 +32,6 @@ GLAPI = $(MAPI)/glapi noinst_HEADERS = \ - libgl.h \ g_glapi_mapi_gl_tmp.h include $(top_srcdir)/src/GLdispatch/vnd-glapi/entry_files.mk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/libgl.c new/libglvnd-0.1.2~20170620~d850cdd/src/GL/libgl.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/libgl.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GL/libgl.c 2017-06-20 20:53:54.000000000 +0200 @@ -30,7 +30,7 @@ #include <dlfcn.h> #include <GL/gl.h> #include <GL/glx.h> -#include "libgl.h" +#include "libglxgl.h" #include "compiler.h" #include "entry.h" #include "stub.h" @@ -53,9 +53,6 @@ // Register these entrypoints with GLdispatch so they can be overwritten at // runtime patchStubId = __glDispatchRegisterStubCallbacks(stub_get_patch_callbacks()); - - // Lookup function pointers from libGLX for the GLX entrypoints - __glXWrapperInit(); } #if defined(USE_ATTRIBUTE_CONSTRUCTOR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/libgl.h new/libglvnd-0.1.2~20170620~d850cdd/src/GL/libgl.h --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GL/libgl.h 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GL/libgl.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#ifndef __libgl_h__ -#define __libgl_h__ - -#include "libglxgl.h" - -extern void __glXWrapperInit(void); - -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GLX/libglx.c new/libglvnd-0.1.2~20170620~d850cdd/src/GLX/libglx.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GLX/libglx.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GLX/libglx.c 2017-06-20 20:53:54.000000000 +0200 @@ -1783,9 +1783,7 @@ { __GLXextFuncPtr func; - if (mutex != NULL) { - __glvndPthreadFuncs.mutex_lock(mutex); - } + __glvndPthreadFuncs.mutex_lock(mutex); func = *ptr; if (func == NULL) { @@ -1793,9 +1791,7 @@ *ptr = func; } - if (mutex != NULL) { - __glvndPthreadFuncs.mutex_unlock(mutex); - } + __glvndPthreadFuncs.mutex_unlock(mutex); return func; } @@ -1975,6 +1971,48 @@ __glXMappingTeardown(True); } +PUBLIC const __glXGLCoreFunctions __GLXGL_CORE_FUNCTIONS = { + glXChooseFBConfig, + glXChooseVisual, + glXCopyContext, + glXCreateContext, + glXCreateGLXPixmap, + glXCreateNewContext, + glXCreatePbuffer, + glXCreatePixmap, + glXCreateWindow, + glXDestroyContext, + glXDestroyGLXPixmap, + glXDestroyPbuffer, + glXDestroyPixmap, + glXDestroyWindow, + glXGetClientString, + glXGetConfig, + glXGetCurrentContext, + glXGetCurrentDrawable, + glXGetCurrentReadDrawable, + glXGetFBConfigAttrib, + glXGetFBConfigs, + glXGetProcAddress, + glXGetProcAddressARB, + glXGetSelectedEvent, + glXGetVisualFromFBConfig, + glXIsDirect, + glXMakeContextCurrent, + glXMakeCurrent, + glXQueryContext, + glXQueryDrawable, + glXQueryExtension, + glXQueryExtensionsString, + glXQueryServerString, + glXQueryVersion, + glXSelectEvent, + glXSwapBuffers, + glXUseXFont, + glXWaitGL, + glXWaitX, +}; + #if defined(USE_ATTRIBUTE_CONSTRUCTOR) void __attribute__ ((constructor)) __glXInit(void) #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GLX/libglxgl.h new/libglvnd-0.1.2~20170620~d850cdd/src/GLX/libglxgl.h --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GLX/libglxgl.h 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GLX/libglxgl.h 2017-06-20 20:53:54.000000000 +0200 @@ -8,6 +8,48 @@ * Glue header defining the ABI between libGLX and the libGL wrapper library. */ +typedef struct { + GLXFBConfig * (* ptr_glXChooseFBConfig) (Display *dpy, int screen, const int *attrib_list, int *nelements); + XVisualInfo * (* ptr_glXChooseVisual) (Display *dpy, int screen, int *attribList); + void (* ptr_glXCopyContext) (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask); + GLXContext (* ptr_glXCreateContext) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct); + GLXPixmap (* ptr_glXCreateGLXPixmap) (Display *dpy, XVisualInfo *visual, Pixmap pixmap); + GLXContext (* ptr_glXCreateNewContext) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); + GLXPbuffer (* ptr_glXCreatePbuffer) (Display *dpy, GLXFBConfig config, const int *attrib_list); + GLXPixmap (* ptr_glXCreatePixmap) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); + GLXWindow (* ptr_glXCreateWindow) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); + void (* ptr_glXDestroyContext) (Display *dpy, GLXContext ctx); + void (* ptr_glXDestroyGLXPixmap) (Display *dpy, GLXPixmap pixmap); + void (* ptr_glXDestroyPbuffer) (Display *dpy, GLXPbuffer pbuf); + void (* ptr_glXDestroyPixmap) (Display *dpy, GLXPixmap pixmap); + void (* ptr_glXDestroyWindow) (Display *dpy, GLXWindow win); + const char * (* ptr_glXGetClientString) (Display *dpy, int name); + int (* ptr_glXGetConfig) (Display *dpy, XVisualInfo *visual, int attrib, int *value); + GLXContext (* ptr_glXGetCurrentContext) (void); + GLXDrawable (* ptr_glXGetCurrentDrawable) (void); + GLXDrawable (* ptr_glXGetCurrentReadDrawable) (void); + int (* ptr_glXGetFBConfigAttrib) (Display *dpy, GLXFBConfig config, int attribute, int *value); + GLXFBConfig * (* ptr_glXGetFBConfigs) (Display *dpy, int screen, int *nelements); + __GLXextFuncPtr (* ptr_glXGetProcAddress) (const GLubyte *procName); + __GLXextFuncPtr (* ptr_glXGetProcAddressARB) (const GLubyte *procName); + void (* ptr_glXGetSelectedEvent) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); + XVisualInfo * (* ptr_glXGetVisualFromFBConfig) (Display *dpy, GLXFBConfig config); + Bool (* ptr_glXIsDirect) (Display *dpy, GLXContext ctx); + Bool (* ptr_glXMakeContextCurrent) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); + Bool (* ptr_glXMakeCurrent) (Display *dpy, GLXDrawable drawable, GLXContext ctx); + int (* ptr_glXQueryContext) (Display *dpy, GLXContext ctx, int attribute, int *value); + void (* ptr_glXQueryDrawable) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); + Bool (* ptr_glXQueryExtension) (Display *dpy, int *errorb, int *event); + const char * (* ptr_glXQueryExtensionsString) (Display *dpy, int screen); + const char * (* ptr_glXQueryServerString) (Display *dpy, int screen, int name); + Bool (* ptr_glXQueryVersion) (Display *dpy, int *maj, int *min); + void (* ptr_glXSelectEvent) (Display *dpy, GLXDrawable draw, unsigned long event_mask); + void (* ptr_glXSwapBuffers) (Display *dpy, GLXDrawable drawable); + void (* ptr_glXUseXFont) (Font font, int first, int count, int list); + void (* ptr_glXWaitGL) (void); + void (* ptr_glXWaitX) (void); +} __glXGLCoreFunctions; + /** * Called from libGL.so to load a GLX function. * @@ -28,4 +70,6 @@ */ extern __GLXextFuncPtr __glXGLLoadGLXFunction(const char *name, __GLXextFuncPtr *ptr, glvnd_mutex_t *mutex); +extern const __glXGLCoreFunctions __GLXGL_CORE_FUNCTIONS; + #endif // !defined(__LIB_GLX_GL_H) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GLdispatch/vnd-glapi/entry_ppc64le_tls.c new/libglvnd-0.1.2~20170620~d850cdd/src/GLdispatch/vnd-glapi/entry_ppc64le_tls.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GLdispatch/vnd-glapi/entry_ppc64le_tls.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GLdispatch/vnd-glapi/entry_ppc64le_tls.c 2017-06-20 20:53:54.000000000 +0200 @@ -162,7 +162,7 @@ " sync\n\t" " icbi 0, %0\n\t" " isync\n" - : "=r" (writeEntry) + : : "r" (writeEntry) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/GLdispatch/vnd-glapi/entry_ppc64le_tsd.c new/libglvnd-0.1.2~20170620~d850cdd/src/GLdispatch/vnd-glapi/entry_ppc64le_tsd.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/GLdispatch/vnd-glapi/entry_ppc64le_tsd.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/GLdispatch/vnd-glapi/entry_ppc64le_tsd.c 2017-06-20 20:53:54.000000000 +0200 @@ -210,7 +210,7 @@ " sync\n\t" " icbi 0, %0\n\t" " isync\n" - : "=r" (writeEntry) + : : "r" (writeEntry) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/generate/gen_libgl_glxstubs.py new/libglvnd-0.1.2~20170620~d850cdd/src/generate/gen_libgl_glxstubs.py --- old/libglvnd-0.1.2~20170427~6bcecd8/src/generate/gen_libgl_glxstubs.py 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/generate/gen_libgl_glxstubs.py 2017-06-20 20:53:54.000000000 +0200 @@ -84,19 +84,15 @@ "glXDestroyGLXVideoSourceSGIX", )) -def generateGLXStubFunction(func): +def generateGLXExtensionStubFunction(func): text = "" text += "typedef {f.rt} (*fn_{f.name}_ptr)({f.decArgs});\n" text += "static fn_{f.name}_ptr __real_{f.name};\n" - if (func.name not in _LIBGLX_FUNCTIONS): - text += "static glvnd_mutex_t __mutex_{f.name} = GLVND_MUTEX_INITIALIZER;\n" + text += "static glvnd_mutex_t __mutex_{f.name} = GLVND_MUTEX_INITIALIZER;\n" text += "PUBLIC {f.rt} {f.name}({f.decArgs})\n" text += "{{\n" text += " fn_{f.name}_ptr _real = " - if (func.name not in _LIBGLX_FUNCTIONS): - text += "(fn_{f.name}_ptr) LOAD_GLX_FUNC({f.name});\n" - else: - text += "__real_{f.name};\n" + text += "(fn_{f.name}_ptr) LOAD_GLX_FUNC({f.name});\n" text += " if(_real != NULL) {{\n" if (func.hasReturn()): @@ -110,6 +106,16 @@ return text.format(f=func, retVal=getDefaultReturnValue(func)) +def generateGLXCoreStubFunction(func): + text = "PUBLIC {f.rt} {f.name}({f.decArgs})\n" + text += "{{\n" + text += " " + if (func.hasReturn()): + text += "return " + text += "__GLXGL_CORE_FUNCTIONS.ptr_{f.name}({f.callArgs});\n" + text += "}}\n\n" + return text.format(f=func) + def generateLibGLXStubs(functions): text = r""" /* @@ -119,7 +125,7 @@ #include <X11/Xlib.h> #include <GL/glx.h> #include "compiler.h" -#include "libgl.h" +#include "libglxgl.h" #include "glvnd_pthread.h" """.lstrip("\n") @@ -127,15 +133,10 @@ text += "#define LOAD_GLX_FUNC(name) __glXGLLoadGLXFunction(#name, (__GLXextFuncPtr *) &__real_##name, &__mutex_##name)\n\n" for func in functions: - text += generateGLXStubFunction(func) - - text += "\n" - text += "void __glXWrapperInit(void)\n" - text += "{\n" - for func in functions: if (func.name in _LIBGLX_FUNCTIONS): - text += ' __glXGLLoadGLXFunction("{f.name}", (__GLXextFuncPtr *) &__real_{f.name}, NULL);\n'.format(f=func) - text += "}\n" + text += generateGLXCoreStubFunction(func) + else: + text += generateGLXExtensionStubFunction(func) return text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/src/util/glvnd_genentry.c new/libglvnd-0.1.2~20170620~d850cdd/src/util/glvnd_genentry.c --- old/libglvnd-0.1.2~20170427~6bcecd8/src/util/glvnd_genentry.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/src/util/glvnd_genentry.c 2017-06-20 20:53:54.000000000 +0200 @@ -327,7 +327,7 @@ " sync\n\t" " icbi 0, %0\n\t" " isync\n" - : "=r" (code) + : : "r" (code) ); #else #error "Can't happen -- not implemented" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libglvnd-0.1.2~20170427~6bcecd8/tests/dummy/patchentrypoints.c new/libglvnd-0.1.2~20170620~d850cdd/tests/dummy/patchentrypoints.c --- old/libglvnd-0.1.2~20170427~6bcecd8/tests/dummy/patchentrypoints.c 2017-04-27 20:13:35.000000000 +0200 +++ new/libglvnd-0.1.2~20170620~d850cdd/tests/dummy/patchentrypoints.c 2017-06-20 20:53:54.000000000 +0200 @@ -204,7 +204,7 @@ " sync\n\t" " icbi 0, %0\n\t" " isync\n" - : "=r" (writeEntry) + : : "r" (writeEntry) ); #else assert(0); // Should not be calling this
