xserver: Branch 'server-1.18-branch' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 05:12:01 UTC 2022


 glx/glxext.c  |   21 +++++++++++++++++++++
 randr/randr.c |    3 +++
 2 files changed, 24 insertions(+)

New commits:
commit 53130b6b05a4a3dd96a9f41e40ca903e998494ff
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 14 22:11:17 2022 -0700

    Revert "randr: Initialize RandR even if there are currently no screens attached"
    
    This wasn't intended to be present in the merged patch series.  Sorry for the noise.
    
    This reverts commit 6f13c13ed69078d4ed33cfb53b804b04c2cb702d.

diff --git a/randr/randr.c b/randr/randr.c
index 51aaa1938..ad1dda227 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -387,6 +387,9 @@ RRExtensionInit(void)
 {
     ExtensionEntry *extEntry;
 
+    if (RRNScreens == 0)
+        return;
+
     if (!dixRegisterPrivateKey(&RRClientPrivateKeyRec, PRIVATE_CLIENT,
                                sizeof(RRClientRec) +
                                screenInfo.numScreens * sizeof(RRTimesRec)))
commit f62edffef1686e1196ba8ae5616429997f9e434d
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 14 22:10:57 2022 -0700

    Revert "glx: Initialize glx even if there are currently no screens attached"
    
    This wasn't intended to be present in the merged patch series.  Sorry for the noise.
    
    This reverts commit 7e7480ff47dc0789d224f2074f8478ec027008af.

diff --git a/glx/glxext.c b/glx/glxext.c
index 0ce8faa76..c201fba86 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -320,6 +320,23 @@ GlxPushProvider(__GLXprovider * provider)
     __glXProviderStack = provider;
 }
 
+static Bool
+checkScreenVisuals(void)
+{
+    int i, j;
+
+    for (i = 0; i < screenInfo.numScreens; i++) {
+        ScreenPtr screen = screenInfo.screens[i];
+        for (j = 0; j < screen->numVisuals; j++) {
+            if (screen->visuals[j].class == TrueColor ||
+                screen->visuals[j].class == DirectColor)
+                return True;
+        }
+    }
+
+    return False;
+}
+
 /*
 ** Initialize the GLX extension.
 */
@@ -338,6 +355,10 @@ GlxExtensionInit(void)
         *stack = &__glXDRISWRastProvider;
     }
 
+    /* Mesa requires at least one True/DirectColor visual */
+    if (!checkScreenVisuals())
+        return;
+
     __glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
                                             "GLXContext");
     __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,


More information about the xorg-commit mailing list