xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

glxmodule.c (2410B)


      1 /**************************************************************************
      2 
      3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
      4 All Rights Reserved.
      5 
      6 Permission is hereby granted, free of charge, to any person obtaining a
      7 copy of this software and associated documentation files (the
      8 "Software"), to deal in the Software without restriction, including
      9 without limitation the rights to use, copy, modify, merge, publish,
     10 distribute, sub license, and/or sell copies of the Software, and to
     11 permit persons to whom the Software is furnished to do so, subject to
     12 the following conditions:
     13 
     14 The above copyright notice and this permission notice (including the
     15 next paragraph) shall be included in all copies or substantial portions
     16 of the Software.
     17 
     18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     19 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
     21 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
     22 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     23 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     24 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     25 
     26 **************************************************************************/
     27 
     28 /*
     29  * Authors:
     30  *   Kevin E. Martin <kevin@precisioninsight.com>
     31  *
     32  */
     33 
     34 #ifdef HAVE_XORG_CONFIG_H
     35 #include <xorg-config.h>
     36 #endif
     37 
     38 #include "xf86Module.h"
     39 #include "xf86Priv.h"
     40 #include "xf86.h"
     41 #include "colormap.h"
     42 #include "micmap.h"
     43 #include "globals.h"
     44 #include "glxserver.h"
     45 #include "extinit.h"
     46 #include "glx_extinit.h"
     47 
     48 static MODULESETUPPROTO(glxSetup);
     49 
     50 static XF86ModuleVersionInfo VersRec = {
     51     "glx",
     52     MODULEVENDORSTRING,
     53     MODINFOSTRING1,
     54     MODINFOSTRING2,
     55     XORG_VERSION_CURRENT,
     56     1, 0, 0,
     57     ABI_CLASS_EXTENSION,
     58     ABI_EXTENSION_VERSION,
     59     MOD_CLASS_NONE,
     60     {0, 0, 0, 0}
     61 };
     62 
     63 _X_EXPORT XF86ModuleData glxModuleData = { &VersRec, glxSetup, NULL };
     64 
     65 static void *
     66 glxSetup(void *module, void *opts, int *errmaj, int *errmin)
     67 {
     68     static Bool setupDone = FALSE;
     69     __GLXprovider *provider;
     70 
     71     if (setupDone) {
     72         if (errmaj)
     73             *errmaj = LDR_ONCEONLY;
     74         return NULL;
     75     }
     76 
     77     setupDone = TRUE;
     78 
     79     provider = LoaderSymbol("__glXDRI2Provider");
     80     if (provider)
     81         GlxPushProvider(provider);
     82     xorgGlxCreateVendor();
     83 
     84     return module;
     85 }