xserver/hw/xgl/glx Makefile.am, 1.1, 1.2 xglx.c, 1.10, 1.11 xglx.h, NONE, 1.1 xglxinit.c, NONE, 1.1

Dave Airlie xserver-commit at pdx.freedesktop.org
Thu Dec 22 18:08:00 PST 2005


Committed by: airlied

Update of /cvs/xserver/xserver/hw/xgl/glx
In directory gabe:/tmp/cvs-serv19869/hw/xgl/glx

Modified Files:
	Makefile.am xglx.c 
Added Files:
	xglx.h xglxinit.c 
Log Message:
Well there were a couple of snapshots later than CVS available outside of 
Novell, so I've done a crazy merge to try and get them into a workable 
CVS, I suspect I may have failed.. there is a pre-xgldrop-merge tag if I did.


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/glx/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Makefile.am	4 Nov 2004 23:19:13 -0000	1.1
+++ Makefile.am	23 Dec 2005 02:07:58 -0000	1.2
@@ -1,16 +1,33 @@
+if XGLSERVER
+MODULE_SUBDIRS = module
+endif
+
+SUBDIRS =		  \
+	.		  \
+	$(MODULE_SUBDIRS)
+
 INCLUDES =		    \
-	@XGL_INCS@	    \
+	@XGLX_INCS@	    \
 	@XSERVER_CFLAGS@    \
+	@XGLSERVER_CFLAGS@  \
 	@XGLXSERVER_CFLAGS@
 
-bin_PROGRAMS = Xglx
+noinst_LTLIBRARIES = libxglx.la
 
-Xglx_SOURCES = xglx.c
+libxglx_la_SOURCES = \
+	xglx.h	     \
+	xglx.c
 
-Xglx_LDADD =	          \
-	@XGL_LIBS@        \
+if XGLXSERVER
+Xglx_DEPENDENCIES = @XGLX_LIBS@
+Xglx_LDFLAGS	  = -export-dynamic
+Xglx_SOURCES	  = xglxinit.c
+Xglx_LDADD	  =	  \
+	@XGLX_LIBS@	  \
 	@XSERVER_LIBS@    \
+	@XGLSERVER_LIBS@  \
 	@XGLXSERVER_LIBS@
+Xglx_programs	  = Xglx
+endif
 
-Xglx_DEPENDENCIES = @XGL_LIBS@
-
+bin_PROGRAMS = $(Xglx_programs)

Index: xglx.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/glx/xglx.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- xglx.c	23 Dec 2005 00:08:35 -0000	1.10
+++ xglx.c	23 Dec 2005 02:07:58 -0000	1.11
@@ -27,7 +27,12 @@
 #include <X11/Xutil.h>
 #include <glitz-glx.h>
 
-#include "xgl.h"
+#include "xglx.h"
+
+#ifdef GLXEXT
+#include "xglglxext.h"
+#endif
+
 #include "inputstr.h"
 #include "cursorstr.h"
 #include "mipointer.h"
@@ -72,21 +77,13 @@
 #define XGLX_CURSOR_PRIV(pCursor, pScreen)			        \
     xglxCursorPtr pCursorPriv = XGLX_GET_CURSOR_PRIV (pCursor, pScreen)
 
-char		 *xDisplayName = NULL;
-Display		 *xdisplay = NULL;
-int		 xscreen;
-glitz_format_t	 *xglxCurrentFormat;
-CARD32		 lastEventTime = 0;
-ScreenPtr	 currentScreen = NULL;
-Bool		 softCursor = FALSE;
-xglScreenInfoRec xglScreenInfo = {
-    NULL, 0, 0, 0, 0, FALSE,
-    DEFAULT_GEOMETRY_DATA_TYPE,
-    DEFAULT_GEOMETRY_USAGE,
-    FALSE,
-    XGL_DEFAULT_PBO_MASK,
-    FALSE
-};
+static char	 *xDisplayName = 0;
+static Display	 *xdisplay     = 0;
+static int	 xscreen;
+static CARD32	 lastEventTime = 0;
+static ScreenPtr currentScreen = 0;
+static Bool	 softCursor    = FALSE;
+static Bool	 fullscreen    = FALSE;
 
 static Bool
 xglxAllocatePrivates (ScreenPtr pScreen)
@@ -375,7 +372,7 @@
     pScreenPriv->colormap =
 	XCreateColormap (xdisplay, root, vinfo->visual, AllocNone);
 
-    if (xglScreenInfo.fullscreen)
+    if (fullscreen)
     {
 	xglScreenInfo.width    = DisplayWidth (xdisplay, xscreen);
 	xglScreenInfo.height   = DisplayHeight (xdisplay, xscreen);
@@ -405,7 +402,7 @@
     normalHints->max_width  = xglScreenInfo.width;
     normalHints->max_height = xglScreenInfo.height;
 
-    if (xglScreenInfo.fullscreen)
+    if (fullscreen)
     {
 	normalHints->x = 0;
 	normalHints->y = 0;
@@ -444,7 +441,7 @@
     
     XMapWindow (xdisplay, pScreenPriv->win);
 
-    if (xglScreenInfo.fullscreen)
+    if (fullscreen)
     {
 	XClientMessageEvent xev;
 	
@@ -465,9 +462,14 @@
 
     xglScreenInfo.drawable = drawable;
     
-    if (!xglScreenInit (pScreen, &xglScreenInfo))
+    if (!xglScreenInit (pScreen))
 	return FALSE;
-    
+
+#ifdef GLXEXT
+    if (!xglInitVisualConfigs (pScreen))
+	return FALSE;
+#endif
+
     XGL_SCREEN_WRAP (CloseScreen, xglxCloseScreen);
 
 #ifdef ARGB_CURSOR
@@ -526,9 +528,9 @@
 }
 
 void
-InitOutput (ScreenInfo *pScreenInfo,
-	    int	       argc,
-	    char       **argv)
+xglxInitOutput (ScreenInfo *pScreenInfo,
+		int	   argc,
+		char	   **argv)
 {
     glitz_drawable_format_t *format, templ;
     int			    i;
@@ -792,21 +794,22 @@
 }
 
 Bool
-LegalModifier (unsigned int key,
-	       DevicePtr    pDev)
+xglxLegalModifier (unsigned int key,
+		   DevicePtr    pDev)
 {
     return TRUE;
 }
 
 void
-ProcessInputEvents ()
+xglxProcessInputEvents (void)
 {
     mieqProcessInputEvents ();
     miPointerUpdate ();
 }
 
 void
-InitInput (int argc, char **argv)
+xglxInitInput (int  argc,
+	       char **argv)
 {
     DeviceIntPtr pKeyboard, pPointer;
     
@@ -827,18 +830,36 @@
 }
 
 void
-ddxUseMsg (void)
+xglxUseMsg (void)
 {
-    ErrorF ("\nXglx usage:\n");
+    ErrorF ("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM] "
+	    "specify screen characteristics\n");
+    ErrorF ("-fullscreen            run fullscreen\n");
     ErrorF ("-display string        display name of the real server\n");
     ErrorF ("-softcursor            force software cursor\n");
-    
-    xglUseMsg ();
 }
 
 int
-ddxProcessArgument (int argc, char **argv, int i)
+xglxProcessArgument (int  argc,
+		     char **argv,
+		     int  i)
 {
+    if (!strcmp (argv[i], "-screen"))
+    {
+	if ((i + 1) < argc)
+	{
+	    xglParseScreen (argv[i + 1]);
+	}
+	else
+	    return 1;
+
+	return 2;
+    }
+    else if (!strcmp (argv[i], "-fullscreen"))
+    {
+	fullscreen = TRUE;
+	return 1;
+    }
     if (!strcmp (argv[i], "-display"))
     {
 	if (++i < argc) {
@@ -853,22 +874,22 @@
 	return 1;
     }
 
-    return xglProcessArgument (&xglScreenInfo, argc, argv, i);
+    return 0;
 }
 
 void
-AbortDDX (void)
-{    
+xglxAbort (void)
+{
 }
 
 void
-ddxGiveUp ()
+xglxGiveUp ()
 {
     AbortDDX ();
 }
 
 void
-OsVendorInit (void)
+xglxOsVendorInit (void)
 {
 }
 
@@ -924,7 +945,7 @@
     
     xformat = XRenderFindStandardFormat (xdisplay, PictStandardARGB32);
     xpicture = XRenderCreatePicture (xdisplay, xpixmap, xformat, 0, 0);
-    
+
     cursor = XRenderCreateCursor (xdisplay, xpicture,
 				  pCursor->bits->xhot,
 				  pCursor->bits->yhot);

--- NEW FILE: xglx.h ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: xglxinit.c ---
(This appears to be a binary file; contents omitted.)



More information about the xserver-commit mailing list