diff options
author | Thomas Winischhofer <thomas@winischhofer.net> | 2004-06-17 16:33:26 +0000 |
---|---|---|
committer | Thomas Winischhofer <thomas@winischhofer.net> | 2004-06-17 16:33:26 +0000 |
commit | 870c22fd4254ee5623dbf82289d1e03edf609bb7 (patch) | |
tree | 6720b2be400a2a8a023a982d0dde078721af0a55 | |
parent | ff1eae67139b7a815ea3d13847d59d04236b3b10 (diff) |
Load glx module automatically if DRI is enabled Make DRI wrapper compile on
older versions, too Bump driver version to correct date
-rw-r--r-- | src/sis.h | 2 | ||||
-rw-r--r-- | src/sis_dri.h | 13 | ||||
-rw-r--r-- | src/sis_driver.c | 24 |
3 files changed, 19 insertions, 20 deletions
@@ -40,7 +40,7 @@ #define SISDRIVERVERSIONYEAR 4 #define SISDRIVERVERSIONMONTH 6 -#define SISDRIVERVERSIONDAY 16 +#define SISDRIVERVERSIONDAY 17 #define SISDRIVERREVISION 1 #define SISDRIVERIVERSION (SISDRIVERVERSIONYEAR << 16) | \ diff --git a/src/sis_dri.h b/src/sis_dri.h index 9603d42..39ace5e 100644 --- a/src/sis_dri.h +++ b/src/sis_dri.h @@ -37,18 +37,13 @@ #include "xf86drm.h" -#if 0 -#ifndef DRI_VERSION_CURRENT -#define drm_handle_t drmHandle -#define drm_context_t drmContext -#endif -#ifdef DRI_VERSION_CURRENT -#if DRI_VERSION_CURRENT < DRI_VERSION_NUMERIC(?,?,?,?) +/* Hack: Since the types were changed, the typedefs + * went into drm.h. This file did not exist earlier. + */ +#ifndef _DRM_H_ #define drm_handle_t drmHandle #define drm_context_t drmContext #endif -#endif -#endif #define SIS_MAX_DRAWABLES 256 #define SISIOMAPSIZE (64*1024) diff --git a/src/sis_driver.c b/src/sis_driver.c index baba1d2..46fcf0c 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -5594,18 +5594,22 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) xf86LoaderReqSymLists(shadowSymbols, NULL); } - /* Load the dri module if requested. */ + /* Load the dri and glx modules if requested. */ #ifdef XF86DRI if(pSiS->loadDRI) { - if(xf86LoadSubModule(pScrn, "dri")) { - xf86LoaderReqSymLists(driSymbols, drmSymbols, NULL); - } else { -#ifdef SISDUALHEAD - if(!pSiS->DualHeadMode) -#endif - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Remove >Load \"dri\"< from the Module section of your XF86Config file\n"); - } + if(!xf86LoaderCheckSymbol("DRIScreenInit")) { + if(xf86LoadSubModule(pScrn, "dri")) { + if(!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) { + if(xf86LoadSubModule(pScrn, "glx")) { + xf86LoaderReqSymLists(driSymbols, drmSymbols, NULL); + } else { + SISErrorLog(pScrn, "Failed to load glx module\n"); + } + } + } else { + SISErrorLog(pScrn, "Failed to load dri module\n"); + } + } } #endif |