mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-18 00:42:40 +00:00
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.
This commit is contained in:
parent
ade104ce5a
commit
feb735c5bb
32 changed files with 2240 additions and 1173 deletions
|
|
@ -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)
|
||||
|
|
|
|||
14
hw/xgl/glx/module/Makefile.am
Normal file
14
hw/xgl/glx/module/Makefile.am
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
INCLUDES = \
|
||||
@XGLX_INCS@ \
|
||||
@XSERVER_CFLAGS@ \
|
||||
@XGLXSERVER_CFLAGS@
|
||||
|
||||
libxglx_la_LDFLAGS = -avoid-version
|
||||
libxglx_la_SOURCES = xglxmodule.c
|
||||
libxglx_la_LIBADD = \
|
||||
@XGLX_MOD_LIBS@ \
|
||||
@XGLXSERVER_LIBS@
|
||||
|
||||
moduledir = @MODULEPATH@/xgl
|
||||
|
||||
module_LTLIBRARIES = libxglx.la
|
||||
104
hw/xgl/glx/module/xglxmodule.c
Normal file
104
hw/xgl/glx/module/xglxmodule.c
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* Copyright © 2005 Novell, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software
|
||||
* and its documentation for any purpose is hereby granted without
|
||||
* fee, provided that the above copyright notice appear in all copies
|
||||
* and that both that copyright notice and this permission notice
|
||||
* appear in supporting documentation, and that the name of
|
||||
* Novell, Inc. not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior permission.
|
||||
* Novell, Inc. makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: David Reveman <davidr@novell.com>
|
||||
*/
|
||||
|
||||
#include "xglx.h"
|
||||
#include "xglmodule.h"
|
||||
|
||||
#include <glitz-glx.h>
|
||||
|
||||
char *
|
||||
moduleVersion (void)
|
||||
{
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
Bool
|
||||
moduleInit (const char *module)
|
||||
{
|
||||
glitz_glx_init (module);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
InitOutput (ScreenInfo *pScreenInfo,
|
||||
int argc,
|
||||
char **argv)
|
||||
{
|
||||
xglxInitOutput (pScreenInfo, argc, argv);
|
||||
}
|
||||
|
||||
Bool
|
||||
LegalModifier (unsigned int key,
|
||||
DevicePtr pDev)
|
||||
{
|
||||
return xglxLegalModifier (key, pDev);
|
||||
}
|
||||
|
||||
void
|
||||
ProcessInputEvents (void)
|
||||
{
|
||||
xglxProcessInputEvents ();
|
||||
}
|
||||
|
||||
void
|
||||
InitInput (int argc,
|
||||
char **argv)
|
||||
{
|
||||
xglxInitInput (argc, argv);
|
||||
}
|
||||
|
||||
void
|
||||
ddxUseMsg (void)
|
||||
{
|
||||
ErrorF ("\nXglx usage:\n");
|
||||
xglxUseMsg ();
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument (int argc,
|
||||
char **argv,
|
||||
int i)
|
||||
{
|
||||
return xglxProcessArgument (argc, argv, i);
|
||||
}
|
||||
|
||||
void
|
||||
AbortDDX (void)
|
||||
{
|
||||
xglxAbort ();
|
||||
}
|
||||
|
||||
void
|
||||
ddxGiveUp (void)
|
||||
{
|
||||
xglxGiveUp ();
|
||||
}
|
||||
|
||||
void
|
||||
OsVendorInit (void)
|
||||
{
|
||||
xglxOsVendorInit ();
|
||||
}
|
||||
|
|
@ -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 @@ typedef struct _xglxCursor {
|
|||
#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 @@ xglxScreenInit (int index,
|
|||
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 @@ xglxScreenInit (int index,
|
|||
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 @@ xglxScreenInit (int index,
|
|||
|
||||
XMapWindow (xdisplay, pScreenPriv->win);
|
||||
|
||||
if (xglScreenInfo.fullscreen)
|
||||
if (fullscreen)
|
||||
{
|
||||
XClientMessageEvent xev;
|
||||
|
||||
|
|
@ -465,9 +462,14 @@ xglxScreenInit (int index,
|
|||
|
||||
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 @@ xglxScreenInit (int index,
|
|||
}
|
||||
|
||||
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 @@ xglxKeybdProc (DeviceIntPtr pDevice,
|
|||
}
|
||||
|
||||
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 @@ InitInput (int argc, char **argv)
|
|||
}
|
||||
|
||||
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 @@ ddxProcessArgument (int argc, char **argv, int i)
|
|||
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 @@ xglxCreateARGBCursor (ScreenPtr pScreen,
|
|||
|
||||
xformat = XRenderFindStandardFormat (xdisplay, PictStandardARGB32);
|
||||
xpicture = XRenderCreatePicture (xdisplay, xpixmap, xformat, 0, 0);
|
||||
|
||||
|
||||
cursor = XRenderCreateCursor (xdisplay, xpicture,
|
||||
pCursor->bits->xhot,
|
||||
pCursor->bits->yhot);
|
||||
|
|
|
|||
64
hw/xgl/glx/xglx.h
Normal file
64
hw/xgl/glx/xglx.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright © 2005 Novell, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software
|
||||
* and its documentation for any purpose is hereby granted without
|
||||
* fee, provided that the above copyright notice appear in all copies
|
||||
* and that both that copyright notice and this permission notice
|
||||
* appear in supporting documentation, and that the name of
|
||||
* Novell, Inc. not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior permission.
|
||||
* Novell, Inc. makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: David Reveman <davidr@novell.com>
|
||||
*/
|
||||
|
||||
#ifndef _XGLX_H_
|
||||
#define _XGLX_H_
|
||||
|
||||
#include "xgl.h"
|
||||
|
||||
void
|
||||
xglxInitOutput (ScreenInfo *pScreenInfo,
|
||||
int argc,
|
||||
char **argv);
|
||||
|
||||
Bool
|
||||
xglxLegalModifier (unsigned int key,
|
||||
DevicePtr pDev);
|
||||
|
||||
void
|
||||
xglxProcessInputEvents (void);
|
||||
|
||||
void
|
||||
xglxInitInput (int argc,
|
||||
char **argv);
|
||||
|
||||
void
|
||||
xglxUseMsg (void);
|
||||
|
||||
int
|
||||
xglxProcessArgument (int argc,
|
||||
char **argv,
|
||||
int i);
|
||||
|
||||
void
|
||||
xglxAbort (void);
|
||||
|
||||
void
|
||||
xglxGiveUp (void);
|
||||
|
||||
void
|
||||
xglxOsVendorInit (void);
|
||||
|
||||
#endif /* _XGLX_H_ */
|
||||
131
hw/xgl/glx/xglxinit.c
Normal file
131
hw/xgl/glx/xglxinit.c
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* Copyright © 2004 David Reveman
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software
|
||||
* and its documentation for any purpose is hereby granted without
|
||||
* fee, provided that the above copyright notice appear in all copies
|
||||
* and that both that copyright notice and this permission notice
|
||||
* appear in supporting documentation, and that the name of
|
||||
* David Reveman not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior permission.
|
||||
* David Reveman makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
* NO EVENT SHALL DAVID REVEMAN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: David Reveman <davidr@novell.com>
|
||||
*/
|
||||
|
||||
#include "xglx.h"
|
||||
|
||||
static xglScreenInfoRec xglxScreenInfo = {
|
||||
NULL, 0, 0, 0, 0,
|
||||
DEFAULT_GEOMETRY_DATA_TYPE,
|
||||
DEFAULT_GEOMETRY_USAGE,
|
||||
FALSE,
|
||||
XGL_DEFAULT_PBO_MASK,
|
||||
FALSE,
|
||||
FALSE
|
||||
};
|
||||
|
||||
#ifdef GLXEXT
|
||||
static Bool loadGlx = TRUE;
|
||||
#endif
|
||||
|
||||
void
|
||||
InitOutput (ScreenInfo *pScreenInfo,
|
||||
int argc,
|
||||
char **argv)
|
||||
{
|
||||
|
||||
#ifdef GLXEXT
|
||||
if (loadGlx)
|
||||
{
|
||||
if (!xglLoadGLXModules ())
|
||||
FatalError ("No GLX modules loaded");
|
||||
}
|
||||
#endif
|
||||
|
||||
xglxInitOutput (&xglxScreenInfo, pScreenInfo, argc, argv);
|
||||
}
|
||||
|
||||
Bool
|
||||
LegalModifier (unsigned int key,
|
||||
DevicePtr pDev)
|
||||
{
|
||||
return xglxLegalModifier (key, pDev);
|
||||
}
|
||||
|
||||
void
|
||||
ProcessInputEvents (void)
|
||||
{
|
||||
xglxProcessInputEvents ();
|
||||
}
|
||||
|
||||
void
|
||||
InitInput (int argc,
|
||||
char **argv)
|
||||
{
|
||||
xglxInitInput (&xglxScreenInfo, argc, argv);
|
||||
}
|
||||
|
||||
void
|
||||
ddxUseMsg (void)
|
||||
{
|
||||
ErrorF ("\nXgl usage:\n");
|
||||
|
||||
#ifdef GLXEXT
|
||||
ErrorF ("-noglx don't load glx extension\n");
|
||||
#endif
|
||||
|
||||
xglUseMsg ();
|
||||
ErrorF ("\nXglx usage:\n");
|
||||
xglxUseMsg ();
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument (int argc,
|
||||
char **argv,
|
||||
int i)
|
||||
{
|
||||
int skip;
|
||||
|
||||
#ifdef GLXEXT
|
||||
if (!strcmp (argv[i], "-noglx"))
|
||||
{
|
||||
loadGlx = FALSE;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
skip = xglProcessArgument (&xglxScreenInfo, argc, argv, i);
|
||||
if (skip)
|
||||
return skip;
|
||||
|
||||
return xglxProcessArgument (&xglxScreenInfo, argc, argv, i);
|
||||
}
|
||||
|
||||
void
|
||||
AbortDDX (void)
|
||||
{
|
||||
xglxAbort ();
|
||||
}
|
||||
|
||||
void
|
||||
ddxGiveUp (void)
|
||||
{
|
||||
xglxGiveUp ();
|
||||
}
|
||||
|
||||
void
|
||||
OsVendorInit (void)
|
||||
{
|
||||
xglxOsVendorInit ();
|
||||
}
|
||||
Loading…
Reference in a new issue