xserver: Branch 'master' - 5 commits

Adam Jackson ajax at kemper.freedesktop.org
Wed Feb 21 16:41:40 UTC 2018


 glx/glxext.c                 |    8 +++++---
 glx/vndcmds.c                |    7 ++++---
 glx/vndext.c                 |   40 ++++++++++++++++++++--------------------
 hw/xfree86/doc/ddxDesign.xml |    2 +-
 4 files changed, 30 insertions(+), 27 deletions(-)

New commits:
commit 9237c5e2878c088a6cd26ea380763465a9e67012
Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Mon Feb 19 15:18:11 2018 +0000

    docs: correct LoadExtensionList() documentation
    
    Add the missing arguments to the function signature.
    
    Fixes: e46820fb897 ("miinitext: introduce LoadExtensionList() to replace
    over LoadExtension()")
    
    Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 13994f7a9..a7f74e4d7 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -5732,7 +5732,7 @@ These may be moved out of the loader at some point.
 
       <blockquote><para>
 	  <programlisting>
-    void LoadExtensionList(const ExtensionModule ext[]);
+    void LoadExtensionList(const ExtensionModule ext[], int size, Bool builtin);
 	  </programlisting>
 	  <blockquote><para>
     This registers the entry points for the extension array identified by
commit 089a1b0f9fa2e80457dc3d5f05c84565c9113a21
Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Mon Feb 19 15:18:10 2018 +0000

    glx: set the version we implement in GlxServerExports
    
    Set the major/minor version it's currently implemented, not the one
    provided by the GLXSERVER_VENDOR_ABI_{MAJOR,MINOR}_VERSION macros.
    
    Those are identical for now, but can change in the future.
    
    Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/vndext.c b/glx/vndext.c
index aeefd7519..c8d753234 100644
--- a/glx/vndext.c
+++ b/glx/vndext.c
@@ -277,8 +277,8 @@ GlxFreeServerImports(GlxServerImports *imports)
 }
 
 _X_EXPORT const GlxServerExports glxServer = {
-    .majorVersion = GLXSERVER_VENDOR_ABI_MAJOR_VERSION,
-    .minorVersion = GLXSERVER_VENDOR_ABI_MINOR_VERSION,
+    .majorVersion = 0,
+    .minorVersion = 0,
 
     .extensionInitCallback = &vndInitCallbackList,
 
commit edc00e020310d8f53ebc16295c373fe84ec6ec87
Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Mon Feb 19 15:18:09 2018 +0000

    glx: use C99 initializers for GlxServerExports
    
    Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/vndext.c b/glx/vndext.c
index f593c499a..aeefd7519 100644
--- a/glx/vndext.c
+++ b/glx/vndext.c
@@ -277,26 +277,26 @@ GlxFreeServerImports(GlxServerImports *imports)
 }
 
 _X_EXPORT const GlxServerExports glxServer = {
-    GLXSERVER_VENDOR_ABI_MAJOR_VERSION, // majorVersion
-    GLXSERVER_VENDOR_ABI_MINOR_VERSION, // minorVersion
-
-    &vndInitCallbackList,
-
-    GlxAllocateServerImports, // allocateServerImports
-    GlxFreeServerImports, // freeServerImports
-
-    GlxCreateVendor, // createVendor
-    GlxDestroyVendor, // destroyVendor
-    GlxSetScreenVendor, // setScreenVendor
-
-    GlxAddXIDMap, // addXIDMap
-    GlxGetXIDMap, // getXIDMap
-    GlxRemoveXIDMap, // removeXIDMap
-    GlxGetContextTag, // getContextTag
-    GlxSetContextTagPrivate, // setContextTagPrivate
-    GlxGetContextTagPrivate, // getContextTagPrivate
-    GlxGetVendorForScreen, // getVendorForScreen
-    GlxForwardRequest, // forwardRequest
+    .majorVersion = GLXSERVER_VENDOR_ABI_MAJOR_VERSION,
+    .minorVersion = GLXSERVER_VENDOR_ABI_MINOR_VERSION,
+
+    .extensionInitCallback = &vndInitCallbackList,
+
+    .allocateServerImports = GlxAllocateServerImports,
+    .freeServerImports = GlxFreeServerImports,
+
+    .createVendor = GlxCreateVendor,
+    .destroyVendor = GlxDestroyVendor,
+    .setScreenVendor = GlxSetScreenVendor,
+
+    .addXIDMap = GlxAddXIDMap,
+    .getXIDMap = GlxGetXIDMap,
+    .removeXIDMap = GlxRemoveXIDMap,
+    .getContextTag = GlxGetContextTag,
+    .setContextTagPrivate = GlxSetContextTagPrivate,
+    .getContextTagPrivate = GlxGetContextTagPrivate,
+    .getVendorForScreen = GlxGetVendorForScreen,
+    .forwardRequest =  GlxForwardRequest,
 };
 
 const GlxServerExports *
commit 7fc757986947ad89d76fc0fd3d69f5fdeefc9055
Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Mon Feb 19 15:18:08 2018 +0000

    glx: NULL check the correct argument in dispatch_GLXVendorPriv
    
    malloc can return NULL, unlike GetVendorDispatchFunc. The latter
    provides DispatchBadRequest.
    
    Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/vndcmds.c b/glx/vndcmds.c
index 200176d4c..c3e1332bf 100644
--- a/glx/vndcmds.c
+++ b/glx/vndcmds.c
@@ -387,12 +387,13 @@ static int dispatch_GLXVendorPriv(ClientPtr client)
         // we'll still add an entry to the dispatch table, so that we don't
         // have to look it up again later.
         disp = (GlxVendorPrivDispatch *) malloc(sizeof(GlxVendorPrivDispatch));
+        if (disp == NULL) {
+            return BadAlloc;
+        }
+
         disp->proc = GetVendorDispatchFunc(stuff->glxCode,
                                            GlxCheckSwap(client,
                                                         stuff->vendorCode));
-        if (disp->proc == NULL) {
-            disp->proc = DispatchBadRequest;
-        }
     }
     return disp->proc(client);
 }
commit 1310241e8d606687811c7394811fe337c3e4de11
Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Mon Feb 19 15:18:07 2018 +0000

    glx: keep glvnd_vendor a private [static] variable
    
    Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/glxext.c b/glx/glxext.c
index a51c13ff1..37416a4e4 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -497,11 +497,11 @@ xorgGlxServerPreInit(const ExtensionEntry *extEntry)
     return glxGeneration == serverGeneration;
 }
 
-static GlxServerVendor *glvnd_vendor = NULL;
-
 static GlxServerVendor *
 xorgGlxInitGLVNDVendor(void)
 {
+    static GlxServerVendor *glvnd_vendor = NULL;
+
     if (glvnd_vendor == NULL) {
         GlxServerImports *imports = NULL;
         imports = glxServer.allocateServerImports();
@@ -521,6 +521,7 @@ xorgGlxInitGLVNDVendor(void)
 static void
 xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext)
 {
+    GlxServerVendor *glvnd_vendor;
     const ExtensionEntry *extEntry = ext;
     int i;
 
@@ -528,7 +529,8 @@ xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext)
         return;
     }
 
-    if (!xorgGlxInitGLVNDVendor()) {
+    glvnd_vendor = xorgGlxInitGLVNDVendor();
+    if (!glvnd_vendor) {
         return;
     }
 


More information about the xorg-commit mailing list