1. Imakefile and config file changes to build DMX Index: config/cf/README =================================================================== RCS file: /cvs/xorg/xc/config/cf/README,v retrieving revision 1.2 diff -u -r1.2 README --- config/cf/README 23 Apr 2004 18:41:58 -0000 1.2 +++ config/cf/README 22 Jun 2004 01:39:43 -0000 @@ -466,6 +466,7 @@ HtmlDir path used by Web server for HTML and RX docs CgiBinDir path used by Web server for CGI programs ProxyManager ICE network ID to contact a running proxymngr + XdmxServer build distributed multihead X server Make Variables Index: config/cf/X11.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/X11.tmpl,v retrieving revision 1.10 diff -u -r1.10 X11.tmpl --- config/cf/X11.tmpl 16 Jun 2004 09:46:14 -0000 1.10 +++ config/cf/X11.tmpl 22 Jun 2004 01:39:43 -0000 @@ -127,8 +127,16 @@ #ifndef BuildDocs #define BuildDocs !BuildServersOnly #endif +#ifndef BuildLibrariesForDMX +#ifdef XdmxServer +#define BuildLibrariesForDMX XdmxServer +#else +#define BuildLibrariesForDMX NO +#endif +#endif #ifndef BuildLibraries -#define BuildLibraries (!BuildServersOnly || BuildClients) +#define BuildLibraries (!BuildServersOnly || BuildClients || \ + BuildLibrariesForDMX) #endif #ifndef BuildLibrariesForXServers #define BuildLibrariesForXServers BuildServer @@ -341,7 +349,8 @@ #define BuildXInputExt NO #endif #ifndef BuildXInputLib -#define BuildXInputLib (BuildXInputExt && !BuildServersOnly) +#define BuildXInputLib (BuildXInputExt && \ + (!BuildServersOnly || BuildLibrariesForDMX)) #endif #ifndef BuildEVI #define BuildEVI YES @@ -365,7 +374,7 @@ #define BuildFontLib (BuildLibraries || \ (BuildServer && !DoLoadableServer) || \ XnestServer || XVirtualFramebufferServer || \ - XprtServer) + XprtServer || XdmxServer) #endif #endif #ifndef BuildFontCache @@ -438,6 +447,12 @@ #ifndef BuildXineramaLibrary #define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly) #endif +#ifndef BuildDmxExt +#define BuildDmxExt XdmxServer +#endif +#ifndef BuildDmxLibrary +#define BuildDmxLibrary (BuildDmxExt && !BuildServersOnly) +#endif #ifndef BuildXCSecurity #define BuildXCSecurity YES #endif @@ -2377,6 +2392,20 @@ ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) #endif +#if BuildDmxLibrary +#ifndef SharedLibDmx +#define SharedLibDmx NO +#endif +#ifndef NormalLibDmx +#define NormalLibDmx YES +#endif +#ifndef DebugLibDmx +#define DebugLibDmx NO +#endif +#ifndef ProfileLibDmx +#define ProfileLibDmx NO +#endif +#endif XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush #if SharedLibXxf86rush @@ -2430,6 +2459,15 @@ ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir) #endif + DMXLIBSRC = $(LIBSRC)/dmx +#if SharedLibDmx +#ifndef SharedDmxRev +#define SharedDmxRev 1.0 +#endif +SharedLibReferences(DMX,dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) +#else +ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir) +#endif DPSLIBSRC = $(LIBSRC)/dps #if SharedLibDps Index: config/cf/xf86site.def =================================================================== RCS file: /cvs/xorg/xc/config/cf/xf86site.def,v retrieving revision 1.3 diff -u -r1.3 xf86site.def --- config/cf/xf86site.def 4 May 2004 22:58:59 -0000 1.3 +++ config/cf/xf86site.def 22 Jun 2004 01:39:44 -0000 @@ -57,6 +57,12 @@ */ /* + * To disable building Xdmx, uncomment this. + * +#define XdmxServer NO + */ + +/* * To disable building Xprt, uncomment this. * #define XprtServer NO @@ -520,6 +526,12 @@ */ /* + * If you don't want to build the dmx extension, uncomment this. + * +#define BuildDmxExt NO + */ + +/* * If you don't want to build support for the GLX extension, uncomment this. * #define BuildGlxExt NO Index: config/cf/xfree86.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/xfree86.cf,v retrieving revision 1.6 diff -u -r1.6 xfree86.cf --- config/cf/xfree86.cf 16 Jun 2004 09:46:14 -0000 1.6 +++ config/cf/xfree86.cf 22 Jun 2004 01:39:44 -0000 @@ -1437,6 +1437,11 @@ # define BuildXinerama YES #endif +/* Build DMX extension */ +#ifndef BuildDmxExt +# define BuildDmxExt YES +#endif + /* Build Render extension */ #ifndef BuildRender # define BuildRender YES @@ -1767,6 +1772,19 @@ # define XprtServer YES #endif +#ifndef XdmxServer +# define XdmxServer YES +#endif +#ifndef BuildDmxDevelTools +# define BuildDmxDevelTools NO +#endif +#if BuildDmxDevelTools && BuildXResExt && !defined(BuildXResLibrary) +# define BuildXResLibrary YES +#endif +#if XdmxServer && BuildRender && !defined(BuildRenderLibrary) +# define BuildRenderLibrary YES +#endif + #ifndef ServerExtraDefines # define ServerExtraDefines XFree86ServerDefines #endif Index: config/cf/xorg.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/xorg.cf,v retrieving revision 1.7 diff -u -r1.7 xorg.cf --- config/cf/xorg.cf 16 Jun 2004 09:46:14 -0000 1.7 +++ config/cf/xorg.cf 22 Jun 2004 01:39:44 -0000 @@ -982,6 +982,11 @@ # define BuildXinerama YES #endif +/* Build DMX extension */ +#ifndef BuildDmxExt +# define BuildDmxExt YES +#endif + /* Build Render extension */ #ifndef BuildRender # define BuildRender YES @@ -1313,6 +1318,19 @@ # define XprtServer YES #endif +#ifndef XdmxServer +# define XdmxServer YES +#endif +#ifndef BuildDmxDevelTools +# define BuildDmxDevelTools NO +#endif +#if BuildDmxDevelTools && BuildXResExt && !defined(BuildXResLibrary) +# define BuildXResLibrary YES +#endif +#if XdmxServer && BuildRender && !defined(BuildRenderLibrary) +# define BuildRenderLibrary YES +#endif + #ifndef ServerExtraDefines # define ServerExtraDefines XFree86ServerDefines #endif Index: config/cf/xorgsite.def =================================================================== RCS file: /cvs/xorg/xc/config/cf/xorgsite.def,v retrieving revision 1.5 diff -u -r1.5 xorgsite.def --- config/cf/xorgsite.def 18 May 2004 21:29:45 -0000 1.5 +++ config/cf/xorgsite.def 22 Jun 2004 01:39:44 -0000 @@ -57,6 +57,12 @@ */ /* + * To disable building Xdmx, uncomment this. + * +#define XdmxServer NO + */ + +/* * To disable building Xprt, uncomment this. * #define XprtServer NO @@ -514,6 +520,12 @@ */ /* + * If you don't want to build the dmx extension, uncomment this. + * +#define BuildDmxExt NO + */ + +/* * If you don't want to build support for the GLX extension, uncomment this. * #define BuildGlxExt NO Index: include/extensions/Imakefile =================================================================== RCS file: /cvs/xorg/xc/include/extensions/Imakefile,v retrieving revision 1.2 diff -u -r1.2 Imakefile --- include/extensions/Imakefile 23 Apr 2004 18:43:06 -0000 1.2 +++ include/extensions/Imakefile 22 Jun 2004 01:39:48 -0000 @@ -52,12 +52,15 @@ #if BuildXResExt || BuildXResLibrary XRESHEADERS = XRes.h XResproto.h #endif +#if BuildDmxExt || BuildDmxLibrary +XDMXHEADERS = dmxext.h dmxproto.h +#endif EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \ $(LBXHEADERS) $(XVHEADERS) $(XVMCHEADERS) $(XF86RUSHHEADERS) \ $(FONTCACHEHEADERS) $(RENDERHEADERS) $(RANDRHEADERS) \ - $(XTRAPHEADERS) $(XRESHEADERS) + $(XTRAPHEADERS) $(XRESHEADERS) $(XDMXHEADERS) Index: lib/Imakefile =================================================================== RCS file: /cvs/xorg/xc/lib/Imakefile,v retrieving revision 1.3 diff -u -r1.3 Imakefile --- lib/Imakefile 28 May 2004 23:34:53 -0000 1.3 +++ lib/Imakefile 22 Jun 2004 01:39:48 -0000 @@ -65,6 +65,10 @@ XRESLIBDIR = XRes #endif +#if BuildDmxLibrary +DMXLIBDIR = dmx +#endif + #if BuildGLXLibrary GLXLIBDIR = GL #endif @@ -206,7 +210,7 @@ $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ $(EXPATBUILDDIR) $(FONTCONFIGBUILDDIR) $(XFT1LIBDIR) \ $(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \ - $(XRESLIBDIR) $(XCURSORLIBDIR) $(APPLELIBDIR) + $(XRESLIBDIR) $(XCURSORLIBDIR) $(APPLELIBDIR) $(DMXLIBDIR) SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \ $(FONTCACHELIBDIR) Index: lib/X11/Imakefile =================================================================== RCS file: /cvs/xorg/xc/lib/X11/Imakefile,v retrieving revision 1.3 diff -u -r1.3 Imakefile --- lib/X11/Imakefile 28 May 2004 23:34:53 -0000 1.3 +++ lib/X11/Imakefile 22 Jun 2004 01:39:48 -0000 @@ -10,7 +10,7 @@ HEADERS = Xlib.h Xresource.h Xutil.h cursorfont.h Xlibint.h \ Xcms.h Xlocale.h XKBlib.h -#if BuildServersOnly && !XnestServer && !BuildGLXLibrary && !BuildClients +#if BuildServersOnly && !XnestServer && !BuildGLXLibrary && !BuildClients && !XdmxServer all:: BuildIncludes($(HEADERS),IncSubdir,..) Index: programs/Xserver/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Imakefile,v retrieving revision 1.5 diff -u -r1.5 Imakefile --- programs/Xserver/Imakefile 21 Jun 2004 13:22:30 -0000 1.5 +++ programs/Xserver/Imakefile 22 Jun 2004 01:39:48 -0000 @@ -499,6 +499,9 @@ #if defined(XVirtualFramebufferServer) && XVirtualFramebufferServer XVFB = Xvfb #endif +#if XdmxServer +XDMX = Xdmx +#endif #if defined(XWinServer) && XWinServer && !MakeDllModules XWIN = XWin #endif @@ -506,6 +509,7 @@ (defined(XorgServer) && XorgServer) || \ (defined(XnestServer) && XnestServer) || \ (defined(XVirtualFramebufferServer) && XVirtualFramebufferServer) || \ + (defined(XdmxServer) && XdmxServer) || \ (!MakeDllModules && defined(XWinServer) && XWinServer) MakeMutex($(XF86SERVER) $(XNEST) $(XVFB) $(XWIN)) #endif @@ -899,6 +903,49 @@ $(LIBCWRAPPER) $(XVFBLIBS) $(LOADABLEEXTS),$(XVFBSYSLIBS)) #endif /* XVirtualFramebufferServer */ +#if defined(XdmxServer) && XdmxServer +XCOMM +XCOMM distribued multihead Server +XCOMM +#ifndef Win32Architecture +XDMXDDXDIR = hw/dmx +#else +XDMXDDXDIR = hw +#endif +FBDIR = fb +FBSUBDIR = fb +SHADOWDIR = miext/shadow +XDMXDIRS = $(STDDIRS) $(XDMXDDXDIR) $(SHADOWDIR) $(DEPDIRS) $(FBDIR) +#if BuildGlxExt +GLXPROXY_EXTRAOBJS = hw/dmx/panoramiX.o +GLXPROXYLIB = hw/dmx/glxProxy/LibraryTargetName(glxProxy) +#endif +#if !defined(LynxOSArchitecture) && \ + !defined(Win32Architecture) && \ + !defined(QNX4Architecture) +XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS) +#else +XDMXOBJS = hw/dmx/miinitext.o $(GLXPROXY_EXTRAOBJS) dix/main.o +#endif +XDMX = hw/dmx/LibraryTargetName(dmx) \ + hw/dmx/input/LibraryTargetName(dmxinput) \ + hw/dmx/config/LibraryTargetName(dmxconfig) \ + $(GLXPROXYLIB) +XDMXLIBS = PreFbLibs $(XDMX) MiExtLibs FbPostFbLibs $(XDMX) +#if BuildRender +XDMXRENDERLIB = $(XRENDERLIB) +#endif +XDMXSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XILIB) $(XLIB) $(SYSLIBS) $(XMULIB) $(XDMXRENDERLIB) +#if HasParallelMake +MakeMutex($(XDMXDIRS) $(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS)) +#endif +#if ForceServerRemake +$(XDMXOBJS) $(XDMXLIBS) $(XDMXSYSLIBS):: $(XDMXDIRS) + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi +#endif +ServerTarget(Xdmx,$(XDMXDIRS),$(XDMXOBJS), \ + $(LIBCWRAPPER) $(XDMXLIBS) $(LOADABLEEXTS),$(XDMXSYSLIBS)) +#endif /* XdmxServer */ #if defined(XWinServer) && XWinServer XCOMM @@ -1107,7 +1154,7 @@ IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR) DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \ $(HPDDXDIR) $(XFREE86DDXDIR) $(XWINDDXDIR) $(DARWINDDXDIR) \ - $(XVFBDDXDIR) $(XNESTDDXDIR) + $(XVFBDDXDIR) $(XNESTDDXDIR) $(XDMXDDXDIR) SUBDIRS = $(STDDIRS) $(MFBSUBDIR) $(CFBSUBDIRS) \ $(IPLANDIRS) $(ILBMDIR) $(AFBSUBDIR) \ $(LMFCFBDIR) $(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) Index: programs/Xserver/Xext/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xext/Imakefile,v retrieving revision 1.2 diff -u -r1.2 Imakefile --- programs/Xserver/Xext/Imakefile 23 Apr 2004 18:44:41 -0000 1.2 +++ programs/Xserver/Xext/Imakefile 22 Jun 2004 01:39:48 -0000 @@ -89,6 +89,11 @@ PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o PNRXINCLUDES = -I$(FONTINCSRC) -I../mi -I../render #endif +#if XdmxServer + DMXSRCS = dmx.c + DMXOBJS = dmx.o + DMXINCLUDES = -I../hw/dmx +#endif #if BuildDPMS DPMSSRCS = dpms.c DPMSOBJS = dpms.o @@ -108,14 +113,14 @@ bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ $(APPGROUPSRCS) xprint.c $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ - $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) + $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS) OBJS = shape.o $(SHMOBJS) $(MULTIBUFOBJ) \ mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ $(APPGROUPOBJS) xprint.o $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ - $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) + $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS) SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) xprint.o \ xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ @@ -127,7 +132,7 @@ #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ $(PNRXINCLUDES) $(XF86INCLUDES) -I$(FONTINCSRC) \ - $(FONTCACHEINCLUDES) + $(FONTCACHEINCLUDES) $(DMXINCLUDES) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln DEFINES = $(EXT_DEFINES) Index: programs/Xserver/fb/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/Imakefile,v retrieving revision 1.2 diff -u -r1.2 Imakefile --- programs/Xserver/fb/Imakefile 23 Apr 2004 19:05:14 -0000 1.2 +++ programs/Xserver/fb/Imakefile 22 Jun 2004 01:39:49 -0000 @@ -17,12 +17,17 @@ #ifdef FbNoPixelAddrCode DEFINES=-DFBNOPIXADDR -DFBNO24BIT #endif - + #if defined(IHaveModules) XFMODSRC = fbmodule.c XFMODOBJ = fbmodule.o #endif +#if BuildRender +RENDERSRC = fbcompose.c +RENDEROBJ = fbcompose.o +#endif + SRCS = $(XFMODSRC) \ fballpriv.c \ fbbits.c \ @@ -30,7 +35,7 @@ fbbltone.c \ fbbstore.c \ fbcmap.c \ - fbcompose.c \ + $(RENDERSRC) \ fbcopy.c \ fbfill.c \ fbfillrect.c \ @@ -64,7 +69,7 @@ fbbltone.o \ fbbstore.o \ fbcmap.o \ - fbcompose.o \ + $(RENDEROBJ) \ fbcopy.o \ fbfill.o \ fbfillrect.o \ @@ -89,7 +94,7 @@ fbwindow.o \ fb24_32.o \ fbpict.o - + INCLUDES = -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ -I$(XINCLUDESRC) \ -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ @@ -129,7 +134,9 @@ LinkSourceFile(fbbltone.c,LinkDirectory) LinkSourceFile(fbbstore.c,LinkDirectory) LinkSourceFile(fbcmap.c,LinkDirectory) +#if BuildRender LinkSourceFile(fbcompose.c,LinkDirectory) +#endif LinkSourceFile(fbcopy.c,LinkDirectory) LinkSourceFile(fbfill.c,LinkDirectory) LinkSourceFile(fbfillrect.c,LinkDirectory) Index: programs/Xserver/hw/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/Imakefile,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Imakefile --- programs/Xserver/hw/Imakefile 14 Nov 2003 16:48:54 -0000 1.1.1.1 +++ programs/Xserver/hw/Imakefile 22 Jun 2004 01:39:49 -0000 @@ -14,7 +14,11 @@ XVFBDIR = vfb #endif -SUBDIRS= $(XNESTDIR) $(XVFBDIR) +#if XdmxServer +XDMXDIR = xdmx +#endif + +SUBDIRS= $(XNESTDIR) $(XVFBDIR) $(XDMXDIR) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) 2. SGI build and config file changes (from SGI) Index: config/cf/sgi.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/sgi.cf,v retrieving revision 1.3 diff -u -r1.3 sgi.cf --- config/cf/sgi.cf 16 Jun 2004 09:46:14 -0000 1.3 +++ config/cf/sgi.cf 22 Jun 2004 01:39:44 -0000 @@ -216,6 +216,7 @@ #define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#ifndef ServerExtraDefines #ifndef Mips64Architecture #define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \ XFree86ServerDefines @@ -223,6 +224,7 @@ #define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \ XFree86ServerDefines -D_XSERVER64 #endif +#endif /* Changed to a single shell command for pmake/smake */ #if OSMajorVersion < 5 Index: programs/Xserver/os/access.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/access.c,v retrieving revision 1.2 diff -u -r1.2 access.c --- programs/Xserver/os/access.c 23 Apr 2004 19:54:28 -0000 1.2 +++ programs/Xserver/os/access.c 22 Jun 2004 01:39:50 -0000 @@ -305,7 +305,7 @@ } -#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF) +#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && !defined(__sgi) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF) /* Deal with different SIOCGIFCONF ioctl semantics on these OSs */ Index: programs/Xserver/include/misc.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/include/misc.h,v retrieving revision 1.2 diff -u -r1.2 misc.h --- programs/Xserver/include/misc.h 23 Apr 2004 19:54:23 -0000 1.2 +++ programs/Xserver/include/misc.h 22 Jun 2004 01:39:50 -0000 @@ -95,7 +95,7 @@ #define MAXCLIENTS 256 #define MAXDITS 1 #define MAXEXTENSIONS 128 -#define MAXFORMATS 8 +#define MAXFORMATS 14 #define MAXVISUALS_PER_SCREEN 50 typedef unsigned long PIXEL; Index: programs/Xserver/mi/micmap.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/micmap.c,v retrieving revision 1.2 diff -u -r1.2 micmap.c --- programs/Xserver/mi/micmap.c 23 Apr 2004 19:54:26 -0000 1.2 +++ programs/Xserver/mi/micmap.c 22 Jun 2004 01:39:50 -0000 @@ -530,6 +530,7 @@ int vtype; miVisualsPtr visuals, nextVisuals; int *preferredCVCs, *prefp; + int first_depth; /* none specified, we'll guess from pixmap formats */ if (!miVisuals) @@ -627,7 +628,24 @@ miVisuals = NULL; visual = *visualp; depth = *depthp; - for (i = 0; i < ndepth; i++) + + /* + * if we did not supplyied by a preferred visual class + * check if there is a preferred class in one of the depth + * structures - if there is, we want to start looking for the + * default visual/depth from that depth. + */ + first_depth = 0; + if (preferredVis < 0 && defaultColorVisualClass < 0 ) { + for (i = 0; i < ndepth; i++) { + if (preferredCVCs[i] >= 0) { + first_depth = i; + break; + } + } + } + + for (i = first_depth; i < ndepth; i++) { int prefColorVisualClass = -1; 3. Add DMX support to miinitext.c Index: programs/Xserver/mi/miinitext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v retrieving revision 1.3 diff -u -r1.3 miinitext.c --- programs/Xserver/mi/miinitext.c 26 Apr 2004 11:07:03 -0000 1.3 +++ programs/Xserver/mi/miinitext.c 22 Jun 2004 01:39:50 -0000 @@ -93,6 +93,10 @@ extern Bool noXkbExtension; #endif +#ifdef DMXSERVER +extern Bool dmxNoRender; +#endif + #ifndef XFree86LOADER #define INITARGS void typedef void (*InitExtension)(INITARGS); @@ -261,6 +265,9 @@ #ifdef RES extern void ResExtensionInit(INITARGS); #endif +#ifdef DMXEXT +extern void DMXExtensionInit(INITARGS); +#endif #ifndef XFree86LOADER @@ -390,6 +397,9 @@ #endif #endif #ifdef RENDER +#ifdef DMXSERVER + if (!dmxNoRender) +#endif RenderExtensionInit(); #endif #ifdef RANDR @@ -398,6 +408,9 @@ #ifdef RES ResExtensionInit(); #endif +#ifdef DMXEXT + DMXExtensionInit(); +#endif } void @@ -468,6 +481,7 @@ { NULL, "RENDER", NULL, NULL }, { NULL, "RANDR", NULL, NULL }, { NULL, "X-Resource", NULL, NULL }, + { NULL, "DMX", NULL, NULL }, { NULL, NULL, NULL, NULL } }; #endif 4. Allow AbortServer to be called from DDX Index: programs/Xserver/os/log.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/log.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 log.c --- programs/Xserver/os/log.c 25 Nov 2003 19:29:01 -0000 1.1.1.1 +++ programs/Xserver/os/log.c 22 Jun 2004 01:39:50 -0000 @@ -385,10 +385,10 @@ } #ifdef __GNUC__ -static void AbortServer(void) __attribute__((noreturn)); +void AbortServer(void) __attribute__((noreturn)); #endif -static void +void AbortServer(void) { OsCleanup(TRUE); 5. Add glyph private and picture private support to Render extension Index: programs/Xserver/render/glyph.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/glyph.c,v retrieving revision 1.2 diff -u -r1.2 glyph.c --- programs/Xserver/render/glyph.c 23 Apr 2004 19:54:29 -0000 1.2 +++ programs/Xserver/render/glyph.c 22 Jun 2004 01:39:50 -0000 @@ -89,6 +89,50 @@ return 0; } +static int _GlyphSetPrivateAllocateIndex = 0; + +int +AllocateGlyphSetPrivateIndex (void) +{ + return _GlyphSetPrivateAllocateIndex++; +} + +void +ResetGlyphSetPrivateIndex (void) +{ + _GlyphSetPrivateAllocateIndex = 0; +} + +Bool +_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr) +{ + pointer *new; + + if (n > glyphSet->maxPrivate) { + if (glyphSet->devPrivates && + glyphSet->devPrivates != (pointer)(&glyphSet[1])) { + new = (pointer *) xrealloc (glyphSet->devPrivates, + (n + 1) * sizeof (pointer)); + if (!new) + return FALSE; + } else { + new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); + if (!new) + return FALSE; + if (glyphSet->devPrivates) + memcpy (new, + glyphSet->devPrivates, + (glyphSet->maxPrivate + 1) * sizeof (pointer)); + } + glyphSet->devPrivates = new; + /* Zero out new, uninitialize privates */ + while (++glyphSet->maxPrivate < n) + glyphSet->devPrivates[glyphSet->maxPrivate] = (pointer)0; + } + glyphSet->devPrivates[n] = ptr; + return TRUE; +} + Bool GlyphInit (ScreenPtr pScreen) { @@ -363,15 +407,24 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) { GlyphSetPtr glyphSet; + int size; if (!globalGlyphs[fdepth].hashSet) { if (!AllocateGlyphHash (&globalGlyphs[fdepth], &glyphHashSets[0])) return FALSE; } - glyphSet = xalloc (sizeof (GlyphSetRec)); + + size = (sizeof (GlyphSetRec) + + (sizeof (pointer) * _GlyphSetPrivateAllocateIndex)); + glyphSet = xalloc (size); if (!glyphSet) return FALSE; + bzero((char *)glyphSet, size); + glyphSet->maxPrivate = _GlyphSetPrivateAllocateIndex - 1; + if (_GlyphSetPrivateAllocateIndex) + glyphSet->devPrivates = (pointer)(&glyphSet[1]); + if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { xfree (glyphSet); @@ -410,6 +463,11 @@ else ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE); xfree (table); + + if (glyphSet->devPrivates && + glyphSet->devPrivates != (pointer)(&glyphSet[1])) + xfree(glyphSet->devPrivates); + xfree (glyphSet); } return Success; Index: programs/Xserver/render/glyphstr.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/glyphstr.h,v retrieving revision 1.2 diff -u -r1.2 glyphstr.h --- programs/Xserver/render/glyphstr.h 23 Apr 2004 19:54:29 -0000 1.2 +++ programs/Xserver/render/glyphstr.h 22 Jun 2004 01:39:50 -0000 @@ -68,8 +68,20 @@ PictFormatPtr format; int fdepth; GlyphHashRec hash; + int maxPrivate; + pointer *devPrivates; } GlyphSetRec, *GlyphSetPtr; +#define GlyphSetGetPrivate(pGlyphSet,n) \ + ((n) > (pGlyphSet)->maxPrivate ? \ + (pointer) 0 : \ + (pGlyphSet)->devPrivates[n]) + +#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \ + ((n) > (pGlyphSet)->maxPrivate ? \ + _GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \ + ((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE)) + typedef struct _GlyphList { INT16 xOff; INT16 yOff; @@ -82,6 +94,15 @@ GlyphHashSetPtr FindGlyphHashSet (CARD32 filled); +int +AllocateGlyphSetPrivateIndex (void); + +void +ResetGlyphSetPrivateIndex (void); + +Bool +_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr); + Bool GlyphInit (ScreenPtr pScreen); Index: programs/Xserver/render/picture.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/picture.c,v retrieving revision 1.2 diff -u -r1.2 picture.c --- programs/Xserver/render/picture.c 23 Apr 2004 19:54:29 -0000 1.2 +++ programs/Xserver/render/picture.c 22 Jun 2004 01:39:51 -0000 @@ -46,6 +46,57 @@ RESTYPE GlyphSetType; int PictureCmapPolicy = PictureCmapPolicyDefault; +/* Picture Private machinery */ + +static int picturePrivateCount; + +void +ResetPicturePrivateIndex (void) +{ + picturePrivateCount = 0; +} + +int +AllocatePicturePrivateIndex (void) +{ + return picturePrivateCount++; +} + +Bool +AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount) +{ + PictureScreenPtr ps = GetPictureScreen(pScreen); + unsigned int oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= ps->PicturePrivateLen) + { + unsigned int *nsizes; + + nsizes = (unsigned int *)xrealloc(ps->PicturePrivateSizes, + (index2 + 1) * sizeof(unsigned int)); + if (!nsizes) + return FALSE; + while (ps->PicturePrivateLen <= index2) + { + nsizes[ps->PicturePrivateLen++] = 0; + ps->totalPictureSize += sizeof(DevUnion); + } + ps->PicturePrivateSizes = nsizes; + } + oldamount = ps->PicturePrivateSizes[index2]; + if (amount > oldamount) + { + ps->PicturePrivateSizes[index2] = amount; + ps->totalPictureSize += (amount - oldamount); + } + + return TRUE; +} + + Bool PictureDestroyWindow (WindowPtr pWindow) { @@ -82,6 +133,8 @@ if (ps->formats[n].type == PictTypeIndexed) (*ps->CloseIndexed) (pScreen, &ps->formats[n]); SetPictureScreen(pScreen, 0); + if (ps->PicturePrivateSizes) + xfree (ps->PicturePrivateSizes); xfree (ps->formats); xfree (ps); return ret; Index: programs/Xserver/render/picturestr.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/picturestr.h,v retrieving revision 1.2 diff -u -r1.2 picturestr.h --- programs/Xserver/render/picturestr.h 23 Apr 2004 19:54:29 -0000 1.2 +++ programs/Xserver/render/picturestr.h 22 Jun 2004 01:39:51 -0000 @@ -303,6 +303,15 @@ } \ } \ +void +ResetPicturePrivateIndex (void); + +int +AllocatePicturePrivateIndex (void); + +Bool +AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount); + Bool PictureDestroyWindow (WindowPtr pWindow); Index: programs/Xserver/render/render.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/render.c,v retrieving revision 1.2 diff -u -r1.2 render.c --- programs/Xserver/render/render.c 23 Apr 2004 19:54:29 -0000 1.2 +++ programs/Xserver/render/render.c 22 Jun 2004 01:39:51 -0000 @@ -243,6 +243,8 @@ static void RenderResetProc (ExtensionEntry *extEntry) { + ResetPicturePrivateIndex(); + ResetGlyphSetPrivateIndex(); } static int 6. Add DMX support to xdpyinfo Index: programs/xdpyinfo/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/xdpyinfo/Imakefile,v retrieving revision 1.3 diff -u -r1.3 Imakefile --- programs/xdpyinfo/Imakefile 16 May 2004 21:52:44 -0000 1.3 +++ programs/xdpyinfo/Imakefile 22 Jun 2004 01:39:51 -0000 @@ -57,11 +57,17 @@ XINERAMALIBS = $(XINERAMALIB) #endif +#if BuildDmxLibrary + DMXDEFINES = -DDMX + DMXLIBS = $(DMXLIB) +#endif + OTHERDEFINES = $(SHMDEFINES) $(XKBDEFINES) $(XINPUTDEFINES) \ $(MULTIBUFDEFINES) $(XIEDEFINES) $(XRENDERDEFINES) \ - $(XINERAMADEFINES) + $(XINERAMADEFINES) $(DMXDEFINES) OTHERDEPLIBS = $(XINPUTDEPLIBS) $(XIEDEPLIBS) $(XRENDERDEPLIBS) - OTHERLIBS = $(XINPUTLIBS) $(XIELIBS) $(XRENDERLIBS) $(XINERAMALIBS) + OTHERLIBS = $(XINPUTLIBS) $(XIELIBS) $(XRENDERLIBS) $(XINERAMALIBS) \ + $(DMXLIBS) DEFINES = $(OTHERDEFINES) $(XF86DEFINES) DEPLIBS = $(DEPXTESTLIB) XkbClientDepLibs $(OTHERDEPLIBS) \ Index: programs/xdpyinfo/xdpyinfo.c =================================================================== RCS file: /cvs/xorg/xc/programs/xdpyinfo/xdpyinfo.c,v retrieving revision 1.4 diff -u -r1.4 xdpyinfo.c --- programs/xdpyinfo/xdpyinfo.c 25 May 2004 02:07:18 -0000 1.4 +++ programs/xdpyinfo/xdpyinfo.c 22 Jun 2004 01:39:51 -0000 @@ -70,6 +70,9 @@ #ifdef PANORAMIX #include #endif +#ifdef DMX +#include +#endif #include #include #include @@ -190,6 +193,38 @@ printf("\n"); } + if (strstr(ServerVendor (dpy), "DMX")) { + int vendrel = VendorRelease(dpy); + int major, minor, year, month, day; + + major = vendrel / 100000000; + vendrel -= major * 100000000; + minor = vendrel / 1000000; + vendrel -= minor * 1000000; + year = vendrel / 10000; + vendrel -= year * 10000; + month = vendrel / 100; + vendrel -= month * 100; + day = vendrel; + + /* Add other epoch tests here */ + if (major > 0 && minor > 0) year += 2000; + + /* Do some sanity tests in case there is + * another server with the same vendor + * string. That server could easily use + * values < 100000000, which would have + * the effect of keeping our major + * number 0. */ + if (major > 0 && major <= 20 + && minor >= 0 && minor <= 99 + && year >= 2000 + && month >= 1 && month <= 12 + && day >= 1 && day <= 31) + printf("DMX version: %d.%d.%04d%02d%02d\n", + major, minor, year, month, day); + } + req_size = XExtendedMaxRequestSize (dpy); if (!req_size) req_size = XMaxRequestSize (dpy); printf ("maximum request size: %ld bytes\n", req_size * 4); @@ -1058,6 +1093,109 @@ #endif /* PANORAMIX */ +#ifdef DMX +static const char *core(DMXInputAttributes *iinfo) +{ + if (iinfo->isCore) return "core"; + else if (iinfo->sendsCore) return "extension (sends core)"; + else return "extension"; +} + +static int print_dmx_info(Display *dpy, char *extname) +{ + int event_base, error_base; + int major_version, minor_version, patch_version; + DMXScreenAttributes sinfo; + DMXInputAttributes iinfo; + int count; + int i; + + if (!DMXQueryExtension(dpy, &event_base, &error_base) + || !DMXQueryVersion(dpy, &major_version, &minor_version, + &patch_version)) return 0; + print_standard_extension_info(dpy, extname, major_version, minor_version); + printf(" Version stamp: %d\n", patch_version); + + if (!DMXGetScreenCount(dpy, &count)) return 1; + printf(" Screen count: %d\n", count); + for (i = 0; i < count; i++) { + if (DMXGetScreenAttributes(dpy, i, &sinfo)) { + printf(" %2d %s %ux%u+%d+%d %d @%dx%d\n", + i, sinfo.displayName, + sinfo.screenWindowWidth, sinfo.screenWindowHeight, + sinfo.screenWindowXoffset, sinfo.screenWindowYoffset, + sinfo.logicalScreen, + sinfo.rootWindowXorigin, sinfo.rootWindowYorigin); + } + } + + if (major_version != 1 + || minor_version < 1 + || !DMXGetInputCount(dpy, &count)) + return 1; + + printf(" Input count = %d\n", count); + for (i = 0; i < count; i++) { +#ifdef XINPUT + Display *backend; + char *backendname = NULL; +#endif + if (DMXGetInputAttributes(dpy, i, &iinfo)) { + switch (iinfo.inputType) { + case DMXLocalInputType: + printf(" %2d local %s", i, core(&iinfo)); + break; + case DMXConsoleInputType: + printf(" %2d console %s %s", i, core(&iinfo), + iinfo.name); + break; + case DMXBackendInputType: +#ifdef XINPUT + if (iinfo.physicalId >= 0) { + if ((backend = XOpenDisplay(iinfo.name))) { + XExtensionVersion *ext + = XGetExtensionVersion(backend, INAME); + if (ext + && ext != (XExtensionVersion *)NoSuchExtension) { + + int count, i; + XDeviceInfo *devInfo = XListInputDevices(backend, + &count); + if (devInfo) { + for (i = 0; i < count; i++) { + if ((unsigned)iinfo.physicalId + == devInfo[i].id + && devInfo[i].name) { + backendname = strdup(devInfo[i].name); + break; + } + } + XFreeDeviceList(devInfo); + } + } + XCloseDisplay(backend); + } + } +#endif + printf(" %2d backend %s o%d/%s",i, core(&iinfo), + iinfo.physicalScreen, iinfo.name); + if (iinfo.physicalId >= 0) printf("/id%d", iinfo.physicalId); +#ifdef XINPUT + if (backendname) { + printf("=%s", backendname); + free(backendname); + } +#endif + break; + } + } + printf("\n"); + } + return 1; +} + +#endif /* DMX */ + static void print_xprint_attrpool(const char *name, const char *attrpool) { @@ -1199,6 +1337,9 @@ #ifdef PANORAMIX {"XINERAMA", print_xinerama_info, False}, #endif +#ifdef DMX + {"DMX", print_dmx_info, False}, +#endif {XP_PRINTNAME, print_xprint_info, False}, /* add new extensions here */ }; 7. Add DMX and GLX Proxy support to Xinerama Index: programs/Xserver/Xext/panoramiX.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xext/panoramiX.c,v retrieving revision 1.2 diff -u -r1.2 panoramiX.c --- programs/Xserver/Xext/panoramiX.c 23 Apr 2004 18:44:41 -0000 1.2 +++ programs/Xserver/Xext/panoramiX.c 22 Jun 2004 01:39:48 -0000 @@ -53,6 +53,12 @@ #include "modinit.h" +#ifdef GLXPROXY +extern VisualPtr glxMatchVisual(ScreenPtr pScreen, + VisualPtr pVisual, + ScreenPtr pMatchScreen); +#endif + #if 0 static unsigned char PanoramiXReqCode = 0; #endif @@ -416,6 +422,56 @@ return TRUE; } +static void XineramaInitData(ScreenPtr pScreen) +{ + int i, w, h; + + REGION_NULL(pScreen, &PanoramiXScreenRegion) + for (i = 0; i < PanoramiXNumScreens; i++) { + BoxRec TheBox; + + pScreen = screenInfo.screens[i]; + + panoramiXdataPtr[i].x = dixScreenOrigins[i].x; + panoramiXdataPtr[i].y = dixScreenOrigins[i].y; + panoramiXdataPtr[i].width = pScreen->width; + panoramiXdataPtr[i].height = pScreen->height; + + TheBox.x1 = panoramiXdataPtr[i].x; + TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width; + TheBox.y1 = panoramiXdataPtr[i].y; + TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height; + + REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1); + REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion, + &XineramaScreenRegions[i]); + } + + PanoramiXPixWidth = panoramiXdataPtr[0].x + panoramiXdataPtr[0].width; + PanoramiXPixHeight = panoramiXdataPtr[0].y + panoramiXdataPtr[0].height; + + for (i = 1; i < PanoramiXNumScreens; i++) { + w = panoramiXdataPtr[i].x + panoramiXdataPtr[i].width; + h = panoramiXdataPtr[i].y + panoramiXdataPtr[i].height; + + if (PanoramiXPixWidth < w) + PanoramiXPixWidth = w; + if (PanoramiXPixHeight < h) + PanoramiXPixHeight = h; + } +} + +void XineramaReinitData(ScreenPtr pScreen) +{ + int i; + + REGION_UNINIT(pScreen, &PanoramiXScreenRegion); + for (i = 0; i < PanoramiXNumScreens; i++) + REGION_UNINIT(pScreen, &XineramaScreenRegions[i]); + + XineramaInitData(pScreen); +} + /* * PanoramiXExtensionInit(): * Called from InitExtensions in main(). @@ -430,8 +486,7 @@ ExtensionEntry *extEntry; ScreenPtr pScreen = screenInfo.screens[0]; PanoramiXScreenPtr pScreenPriv; - int w, h; - + if (noPanoramiXExtension) return; @@ -509,41 +564,7 @@ return; } - - REGION_NULL(pScreen, &PanoramiXScreenRegion); - for (i = 0; i < PanoramiXNumScreens; i++) { - BoxRec TheBox; - - pScreen = screenInfo.screens[i]; - - panoramiXdataPtr[i].x = dixScreenOrigins[i].x; - panoramiXdataPtr[i].y = dixScreenOrigins[i].y; - panoramiXdataPtr[i].width = pScreen->width; - panoramiXdataPtr[i].height = pScreen->height; - - TheBox.x1 = panoramiXdataPtr[i].x; - TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width; - TheBox.y1 = panoramiXdataPtr[i].y; - TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height; - - REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1); - REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion, - &XineramaScreenRegions[i]); - } - - - PanoramiXPixWidth = panoramiXdataPtr[0].x + panoramiXdataPtr[0].width; - PanoramiXPixHeight = panoramiXdataPtr[0].y + panoramiXdataPtr[0].height; - - for (i = 1; i < PanoramiXNumScreens; i++) { - w = panoramiXdataPtr[i].x + panoramiXdataPtr[i].width; - h = panoramiXdataPtr[i].y + panoramiXdataPtr[i].height; - - if(PanoramiXPixWidth < w) - PanoramiXPixWidth = w; - if(PanoramiXPixHeight < h) - PanoramiXPixHeight = h; - } + XineramaInitData(pScreen); /* * Put our processes into the ProcVector @@ -789,6 +810,18 @@ /* check if the visual exists on all screens */ for (j = 1; j < PanoramiXNumScreens; j++) { pScreen2 = screenInfo.screens[j]; + +#ifdef GLXPROXY + pVisual2 = glxMatchVisual(pScreen, pVisual, pScreen2); + if (pVisual2) { + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = + pVisual2->vid; + continue; + } else if (glxMatchVisual(pScreen, pVisual, pScreen)) { + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = 0; + break; + } +#endif pVisual2 = pScreen2->visuals; for (k = 0; k < pScreen2->numVisuals; k++, pVisual2++) { Index: programs/Xserver/Xext/panoramiXsrv.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xext/panoramiXsrv.h,v retrieving revision 1.2 diff -u -r1.2 panoramiXsrv.h --- programs/Xserver/Xext/panoramiXsrv.h 23 Apr 2004 18:44:41 -0000 1.2 +++ programs/Xserver/Xext/panoramiXsrv.h 22 Jun 2004 01:39:48 -0000 @@ -20,6 +20,8 @@ extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)); extern int XineramaDeleteResource(pointer, XID); +extern void XineramaReinitData(ScreenPtr); + extern RegionRec XineramaScreenRegions[MAXSCREENS]; extern unsigned long XRC_DRAWABLE; Index: programs/Xserver/dix/events.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/events.c,v retrieving revision 1.2 diff -u -r1.2 events.c --- programs/Xserver/dix/events.c 23 Apr 2004 19:04:44 -0000 1.2 +++ programs/Xserver/dix/events.c 22 Jun 2004 01:39:49 -0000 @@ -2036,6 +2036,46 @@ (void) CheckMotion((xEvent *)NULL); } +#ifdef PANORAMIX +/* This was added to support reconfiguration under Xdmx. The problem is + * that if the 0th screen (i.e., WindowTable[0]) is moved to an origin + * other than 0,0, the information in the private sprite structure must + * be updated accordingly, or XYToWindow (and other routines) will not + * compute correctly. */ +void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) +{ + ScreenPtr pScreen = win->drawable.pScreen; + GrabPtr grab; + + if (noPanoramiXExtension) return; + + sprite.hot.x -= xoff; + sprite.hot.y -= yoff; + + sprite.hotPhys.x -= xoff; + sprite.hotPhys.y -= yoff; + + sprite.hotLimits.x1 -= xoff; + sprite.hotLimits.y1 -= yoff; + sprite.hotLimits.x2 -= xoff; + sprite.hotLimits.y2 -= yoff; + + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff); + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff); + + /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ + if ((grab = inputInfo.pointer->grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); +} +#endif + void DefineInitialRootWindow(win) register WindowPtr win; 8. Add support for changing the default VENDOR_RELEASE and VENDOR_STRING Index: programs/Xserver/dix/main.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v retrieving revision 1.2 diff -u -r1.2 main.c --- programs/Xserver/dix/main.c 23 Apr 2004 19:04:44 -0000 1.2 +++ programs/Xserver/dix/main.c 22 Jun 2004 01:39:49 -0000 @@ -500,6 +500,21 @@ return(0); } +static int VendorRelease = VENDOR_RELEASE; +static char *VendorString = VENDOR_STRING; + +void +SetVendorRelease(int release) +{ + VendorRelease = release; +} + +void +SetVendorString(char *string) +{ + VendorString = string; +} + static int padlength[4] = {0, 3, 2, 1}; #ifndef PANORAMIX @@ -523,7 +538,7 @@ /* Leave off the ridBase and ridMask, these must be sent with connection */ - setup.release = VENDOR_RELEASE; + setup.release = VendorRelease; /* * per-server image and bitmap parameters are defined in Xmd.h */ @@ -535,7 +550,7 @@ setup.bitmapBitOrder = screenInfo.bitmapBitOrder; setup.motionBufferSize = NumMotionEvents(); setup.numRoots = screenInfo.numScreens; - setup.nbytesVendor = strlen(VENDOR_STRING); + setup.nbytesVendor = strlen(VendorString); setup.numFormats = screenInfo.numPixmapFormats; setup.maxRequestSize = MAX_REQUEST_SIZE; QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); @@ -552,7 +567,7 @@ sizesofar = sizeof(xConnSetup); pBuf = ConnectionInfo + sizeof(xConnSetup); - memmove(pBuf, VENDOR_STRING, (int)setup.nbytesVendor); + memmove(pBuf, VendorString, (int)setup.nbytesVendor); sizesofar += setup.nbytesVendor; pBuf += setup.nbytesVendor; i = padlength[setup.nbytesVendor & 3]; 9. Add protocol and strutures to support GLX Proxy (from SGI) Index: include/GL/glxint.h =================================================================== RCS file: /cvs/xorg/xc/include/GL/glxint.h,v retrieving revision 1.2 diff -u -r1.2 glxint.h --- include/GL/glxint.h 23 Apr 2004 18:43:06 -0000 1.2 +++ include/GL/glxint.h 22 Jun 2004 01:39:48 -0000 @@ -25,8 +25,10 @@ #include #include +#include "GL/gl.h" typedef struct __GLXvisualConfigRec __GLXvisualConfig; +typedef struct __GLXFBConfigRec __GLXFBConfig; struct __GLXvisualConfigRec { VisualID vid; @@ -48,12 +50,15 @@ /* colors are floats scaled to ints */ int transparentRed, transparentGreen, transparentBlue, transparentAlpha; int transparentIndex; + int multiSampleSize; + int nMultiSampleBuffers; + int visualSelectGroup; }; #define __GLX_MIN_CONFIG_PROPS 18 #define __GLX_MAX_CONFIG_PROPS 500 -#define __GLX_EXT_CONFIG_PROPS 7 +#define __GLX_EXT_CONFIG_PROPS 10 /* ** Since we send all non-core visual properties as token, value pairs, @@ -65,4 +70,60 @@ #define __GLX_TOTAL_CONFIG (__GLX_MIN_CONFIG_PROPS + \ 2 * __GLX_EXT_CONFIG_PROPS) +struct __GLXFBConfigRec { + int visualType; + int transparentType; + /* colors are floats scaled to ints */ + int transparentRed, transparentGreen, transparentBlue, transparentAlpha; + int transparentIndex; + + int visualCaveat; + + int associatedVisualId; + int screen; + + int drawableType; + int renderType; + + int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels; + int optimalPbufferWidth, optimalPbufferHeight; /* for SGIX_pbuffer */ + + int visualSelectGroup; /* visuals grouped by select priority */ + + unsigned int id; + + GLboolean rgbMode; + GLboolean colorIndexMode; + GLboolean doubleBufferMode; + GLboolean stereoMode; + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + /* The number of bits present in various buffers */ + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + GLint indexBits; + GLint redBits, greenBits, blueBits, alphaBits; + GLuint redMask, greenMask, blueMask, alphaMask; + + GLuint multiSampleSize; /* Number of samples per pixel (0 if no ms) */ + + GLuint nMultiSampleBuffers; /* Number of availble ms buffers */ + GLint maxAuxBuffers; + + /* frame buffer level */ + GLint level; + + /* color ranges (for SGI_color_range) */ + GLboolean extendedRange; + GLdouble minRed, maxRed; + GLdouble minGreen, maxGreen; + GLdouble minBlue, maxBlue; + GLdouble minAlpha, maxAlpha; +}; + +#define __GLX_TOTAL_FBCONFIG_PROPS 35 + #endif /* !__GLX_glxint_h__ */ Index: include/GL/glxproto.h =================================================================== RCS file: /cvs/xorg/xc/include/GL/glxproto.h,v retrieving revision 1.3 diff -u -r1.3 glxproto.h --- include/GL/glxproto.h 16 Jun 2004 09:47:09 -0000 1.3 +++ include/GL/glxproto.h 22 Jun 2004 01:39:48 -0000 @@ -962,6 +962,20 @@ } xGLXMakeCurrentReadSGIReq; #define sz_xGLXMakeCurrentReadSGIReq 24 +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 writeVid B32; + CARD32 writeType B32; + CARD32 readVid B32; + CARD32 readType B32; + CARD32 pad6 B32; +} xGLXMakeCurrentReadSGIReply; +#define sz_xGLXMakeCurrentReadSGIReply 32 + /* ** glXGetFBConfigsSGIX request */ @@ -1013,6 +1027,61 @@ } xGLXCreateGLXPixmapWithConfigSGIXReq; #define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28 +/* +** glXJoinSwapGroupSGIX request +*/ +typedef struct GLXJoinSwapGroupSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + GLXDrawable member B32; +} xGLXJoinSwapGroupSGIXReq; +#define sz_xGLXJoinSwapGroupSGIXReq 20 + +/* +** glXBindSwapBarrierSGIX request +*/ +typedef struct GLXBindSwapBarrierSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + CARD32 barrier B32; +} xGLXBindSwapBarrierSGIXReq; +#define sz_xGLXBindSwapBarrierSGIXReq 20 + +/* +** glXQueryMaxSwapBarriersSGIX request +*/ +typedef struct GLXQueryMaxSwapBarriersSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + CARD32 screen B32; +} xGLXQueryMaxSwapBarriersSGIXReq; +#define sz_xGLXQueryMaxSwapBarriersSGIXReq 16 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 max B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryMaxSwapBarriersSGIXReply; +#define sz_xGLXQueryMaxSwapBarriersSGIXReply 32 + /************************************************************************/ /* @@ -1705,6 +1774,12 @@ __GLX_COLOR_SUBTABLE_HDR; } __GLXdispatchColorSubTableHeader; +#define GLX_WINDOW_TYPE 1 +#define GLX_PIXMAP_TYPE 2 +#define GLX_VIDEO_SOURCE_TYPE 3 +#define GLX_PBUFFER_TYPE 4 +/* 5 is for DM_PBUFFER */ +#define GLX_GLXWINDOW_TYPE 6 /*****************************************************************************/ @@ -2101,6 +2176,17 @@ /* Opcodes for Vendor Private commands */ + +#define X_GLvop_GetConvolutionFilterEXT 1 +#define X_GLvop_GetConvolutionParameterfvEXT 2 +#define X_GLvop_GetConvolutionParameterivEXT 3 +#define X_GLvop_GetSeparableFilterEXT 4 +#define X_GLvop_GetHistogramEXT 5 +#define X_GLvop_GetHistogramParameterfvEXT 6 +#define X_GLvop_GetHistogramParameterivEXT 7 +#define X_GLvop_GetMinmaxEXT 8 +#define X_GLvop_GetMinmaxParameterfvEXT 9 +#define X_GLvop_GetMinmaxParameterivEXT 10 #define X_GLvop_AreTexturesResidentEXT 11 #define X_GLvop_DeleteTexturesEXT 12 #define X_GLvop_GenTexturesEXT 13 @@ -2136,7 +2222,16 @@ #define X_GLvop_GetProgramNamedParameter4dvNV 1311 #define X_GLvop_SampleMaskSGIS 2048 #define X_GLvop_SamplePatternSGIS 2049 - +#define X_GLvop_GetDetailTexFuncSGIS 4096 +#define X_GLvop_GetSharpenTexFuncSGIS 4097 +#define X_GLvop_GetColorTableSGI 4098 +#define X_GLvop_GetColorTableParameterfvSGI 4099 +#define X_GLvop_GetColorTableParameterivSGI 4100 +#define X_GLvop_GetTexFilterFuncSGIS 4101 +#define X_GLvop_GetInstrumentsSGIX 4102 +#define X_GLvop_InstrumentsBufferSGIX 4103 +#define X_GLvop_PollInstrumentsSGIX 4104 +#define X_GLvop_FlushRasterSGIX 4105 /* Opcodes for GLX vendor private commands */ Index: include/GL/glxtokens.h =================================================================== RCS file: /cvs/xorg/xc/include/GL/glxtokens.h,v retrieving revision 1.3 diff -u -r1.3 glxtokens.h --- include/GL/glxtokens.h 16 Jun 2004 09:47:09 -0000 1.3 +++ include/GL/glxtokens.h 22 Jun 2004 01:39:48 -0000 @@ -85,6 +85,10 @@ #define GLX_MAX_PBUFFER_PIXELS 0x8018 #define GLX_VISUAL_ID 0x800B +/* FBConfigSGIX Attributes */ +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A + /* ** Error return values from glXGetConfig. Success is indicated by ** a value of 0. @@ -210,6 +214,9 @@ #define GLX_SWAP_COPY_OML 0x8062 #define GLX_SWAP_UNDEFINED_OML 0x8063 +/* Property values for multi-sampling */ +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 /* visuals grouped by select priority */ + /* ** Names for attributes to glXGetClientString. */