xserver/hw/xgl Makefile.am, 1.8, 1.9 xgl.h, 1.15, 1.16 xglcmap.c,
1.7, 1.8 xglglx.c, 1.11, NONE xglhash.c, 1.1, 1.2 xglinit.c,
1.2, 1.3 xglloader.c, NONE, 1.1 xglmodule.h, NONE,
1.1 xglparse.c, 1.5, 1.6 xglpixmap.c, 1.11, 1.12 xglscreen.c,
1.10, 1.11 xglsync.c, 1.8, 1.9 xgltrap.c, 1.6, 1.7
Dave Airlie
xserver-commit at pdx.freedesktop.org
Thu Dec 22 18:08:00 PST 2005
- Previous message: xserver/hw/xgl/egl Makefile.am, 1.3, 1.4 evdev.c, 1.3, 1.4 kinput.c,
1.1, 1.2 xegl.c, 1.5, 1.6 xegl.h, 1.1, 1.2 xeglinit.c, NONE, 1.1
- Next message: xserver/hw/xgl/glx/module Makefile.am, NONE, 1.1 xglxmodule.c, NONE,
1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: airlied
Update of /cvs/xserver/xserver/hw/xgl
In directory gabe:/tmp/cvs-serv19869/hw/xgl
Modified Files:
Makefile.am xgl.h xglcmap.c xglhash.c xglparse.c xglpixmap.c
xglscreen.c xglsync.c xgltrap.c
Added Files:
xglinit.c xglloader.c xglmodule.h
Removed Files:
xglglx.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/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am 13 Jun 2005 16:38:06 -0000 1.8
+++ Makefile.am 23 Dec 2005 02:07:58 -0000 1.9
@@ -1,17 +1,26 @@
-if XGLXSERVER
+if GLX
+GLX_SUBDIRS = glxext
+endif
+
+if XGLX
XGLX_SUBDIRS = glx
endif
-if XEGLSERVER
+if XEGL
XEGL_SUBDIRS = egl
endif
-SUBDIRS = . $(XGLX_SUBDIRS) $(XEGL_SUBDIRS)
+SUBDIRS = \
+ . \
+ $(GLX_SUBDIRS) \
+ $(XGLX_SUBDIRS) \
+ $(XEGL_SUBDIRS)
INCLUDES = \
@XGL_INCS@ \
@XSERVER_CFLAGS@ \
- @XGLSERVER_CFLAGS@
+ @XGLSERVER_CFLAGS@ \
+ -DMODULEPATH=\"@MODULEPATH@\"
noinst_LIBRARIES = libxgl.a
@@ -40,4 +49,18 @@
xglglyph.c \
xgltrap.c \
xglhash.c \
+ xglloader.c \
xglglx.c
+
+if XGLSERVER
+Xgl_DEPENDENCIES = @XGL_LIBS@
+Xgl_LDFLAGS = -export-dynamic
+Xgl_SOURCES = xglinit.c
+Xgl_LDADD = \
+ @XGL_LIBS@ \
+ @XSERVER_LIBS@ \
+ @XGLSERVER_LIBS@
+Xgl_programs = Xgl
+endif
+
+bin_PROGRAMS = $(Xgl_programs)
Index: xgl.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xgl.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- xgl.h 23 Dec 2005 00:08:35 -0000 1.15
+++ xgl.h 23 Dec 2005 02:07:58 -0000 1.16
@@ -55,7 +55,7 @@
extern WindowPtr *WindowTable;
-#define XGL_DEFAULT_PBO_MASK 0 /* don't use PBO as default */
+#define XGL_DEFAULT_PBO_MASK 0
typedef struct _xglScreenInfo {
glitz_drawable_t *drawable;
@@ -63,14 +63,16 @@
unsigned int height;
unsigned int widthMm;
unsigned int heightMm;
- Bool fullscreen;
int geometryDataType;
int geometryUsage;
Bool yInverted;
int pboMask;
Bool lines;
+ Bool fbo;
} xglScreenInfoRec, *xglScreenInfoPtr;
+extern xglScreenInfoRec xglScreenInfo;
+
typedef struct _xglPixelFormat {
CARD8 depth, bitsPerRGB;
glitz_pixel_masks_t masks;
@@ -213,6 +215,7 @@
Bool yInverted;
int pboMask;
Bool lines;
+ Bool fbo;
xglGeometryRec scratchGeometry;
#ifdef RENDER
@@ -489,24 +492,21 @@
char *last);
void
-xglParseScreen (xglScreenInfoPtr pScreenInfo,
- char *arg);
+xglParseScreen (char *arg);
void
xglUseMsg (void);
int
-xglProcessArgument (xglScreenInfoPtr pScreenInfo,
- int argc,
- char **argv,
- int i);
+xglProcessArgument (int argc,
+ char **argv,
+ int i);
/* xglscreen.c */
Bool
-xglScreenInit (ScreenPtr pScreen,
- xglScreenInfoPtr pScreenInfo);
+xglScreenInit (ScreenPtr pScreen);
Bool
xglFinishScreenInit (ScreenPtr pScreen);
@@ -872,6 +872,10 @@
xglAddCurrentSurfaceDamage (DrawablePtr pDrawable);
void
+xglAddBitDamage (DrawablePtr pDrawable,
+ RegionPtr pRegion);
+
+void
xglAddCurrentBitDamage (DrawablePtr pDrawable);
@@ -1327,10 +1331,47 @@
#endif
+#ifdef XLOADABLE
+
+/* xglloader.c */
+
+typedef struct _xglSymbol {
+ void **ptr;
+ const char *name;
+} xglSymbolRec, *xglSymbolPtr;
+
+void *
+xglLoadModule (const char *name);
+
+void
+xglUnloadModule (void *handle);
+
+Bool
+xglLookupSymbols (void *handle,
+ xglSymbolPtr sym,
+ int nSym);
+
+#endif
+
#ifdef GLXEXT
+/* xglglx.c */
+
+Bool
+xglLoadGLXModules (void);
+
+void
+xglUnloadGLXModules (void);
+
+#endif
+
+/* xglhash.c */
+
typedef struct _xglHashTable *xglHashTablePtr;
+Bool
+xglLoadHashFuncs (void *handle);
+
xglHashTablePtr
xglNewHashTable (void);
@@ -1361,9 +1402,4 @@
xglHashFindFreeKeyBlock (xglHashTablePtr pTable,
unsigned int numKeys);
-Bool
-xglInitVisualConfigs (ScreenPtr pScreen);
-
-#endif
-
#endif /* _XGL_H_ */
Index: xglcmap.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglcmap.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- xglcmap.c 23 Dec 2005 00:08:35 -0000 1.7
+++ xglcmap.c 23 Dec 2005 02:07:58 -0000 1.8
@@ -23,6 +23,7 @@
* Author: David Reveman <davidr at novell.com>
*/
+#include <stdint.h>
#include "xgl.h"
#include "colormapst.h"
#include "micmap.h"
@@ -147,7 +148,6 @@
nxglVisuals++;
}
}
-
}
}
--- xglglx.c DELETED ---
Index: xglhash.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglhash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xglhash.c 19 Apr 2005 14:51:29 -0000 1.1
+++ xglhash.c 23 Dec 2005 02:07:58 -0000 1.2
@@ -1,6 +1,6 @@
/*
* 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
@@ -12,11 +12,11 @@
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * 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,
+ * 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.
*
@@ -25,58 +25,77 @@
#include "xgl.h"
-#ifdef GLXEXT
-
-/* This is just a wrapper around Mesa's hash functions. */
+#define SYM(ptr, name) { (void **) &(ptr), (name) }
-extern struct _mesa_HashTable *
-_mesa_NewHashTable (void);
+typedef struct _xglHashFunc {
+ xglHashTablePtr (*NewHashTable) (void);
+ void (*DeleteHashTable) (xglHashTablePtr pTable);
+ void *(*HashLookup) (const xglHashTablePtr pTable,
+ unsigned int key);
+ void (*HashInsert) (xglHashTablePtr pTable,
+ unsigned int key,
+ void *data);
+ void (*HashRemove) (xglHashTablePtr pTable,
+ unsigned int key);
+ unsigned int (*HashFirstEntry) (xglHashTablePtr pTable);
+ unsigned int (*HashNextEntry) (const xglHashTablePtr pTable,
+ unsigned int key);
+ unsigned int (*HashFindFreeKeyBlock) (xglHashTablePtr pTable,
+ unsigned int numKeys);
+} xglHashFuncRec;
-extern void
-_mesa_DeleteHashTable (struct _mesa_HashTable *table);
+static xglHashFuncRec __hashFunc;
-extern void *
-_mesa_HashLookup (const struct _mesa_HashTable *table,
- unsigned int key);
+static void *hashHandle = 0;
-extern void
-_mesa_HashInsert (struct _mesa_HashTable *table,
- unsigned int key,
- void *data);
+Bool
+xglLoadHashFuncs (void *handle)
+{
-extern void
-_mesa_HashRemove (struct _mesa_HashTable *table,
- unsigned int key);
+#ifdef XLOADABLE
+ xglSymbolRec sym[] = {
+ SYM (__hashFunc.NewHashTable, "_mesa_NewHashTable"),
+ SYM (__hashFunc.DeleteHashTable, "_mesa_DeleteHashTable"),
+ SYM (__hashFunc.HashLookup, "_mesa_HashLookup"),
+ SYM (__hashFunc.HashInsert, "_mesa_HashInsert"),
+ SYM (__hashFunc.HashRemove, "_mesa_HashRemove"),
+ SYM (__hashFunc.HashFirstEntry, "_mesa_HashFirstEntry"),
+ SYM (__hashFunc.HashNextEntry, "_mesa_HashNextEntry"),
+ SYM (__hashFunc.HashFindFreeKeyBlock, "_mesa_HashFindFreeKeyBlock")
+ };
-extern unsigned int
-_mesa_HashFirstEntry (struct _mesa_HashTable *table);
+ if (!xglLookupSymbols (handle, sym, sizeof (sym) / sizeof (sym[0])))
+ return FALSE;
-extern unsigned int
-_mesa_HashNextEntry (const struct _mesa_HashTable *table,
- unsigned int key);
+ hashHandle = handle;
-extern unsigned int
-_mesa_HashFindFreeKeyBlock (struct _mesa_HashTable *table,
- unsigned int numKeys);
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
xglHashTablePtr
xglNewHashTable (void)
{
- return (xglHashTablePtr) _mesa_NewHashTable ();
+ if (!hashHandle)
+ return 0;
+
+ return (*__hashFunc.NewHashTable) ();
}
void
xglDeleteHashTable (xglHashTablePtr pTable)
{
- _mesa_DeleteHashTable ((struct _mesa_HashTable *) pTable);
+ (*__hashFunc.DeleteHashTable) (pTable);
}
void *
xglHashLookup (const xglHashTablePtr pTable,
unsigned int key)
{
- return _mesa_HashLookup ((struct _mesa_HashTable *) pTable, key);
+ return (*__hashFunc.HashLookup) (pTable, key);
}
void
@@ -84,35 +103,32 @@
unsigned int key,
void *data)
{
- _mesa_HashInsert ((struct _mesa_HashTable *) pTable, key, data);
+ (*__hashFunc.HashInsert) (pTable, key, data);
}
void
xglHashRemove (xglHashTablePtr pTable,
unsigned int key)
{
- _mesa_HashRemove ((struct _mesa_HashTable *) pTable, key);
+ (*__hashFunc.HashRemove) (pTable, key);
}
unsigned int
xglHashFirstEntry (xglHashTablePtr pTable)
{
- return _mesa_HashFirstEntry ((struct _mesa_HashTable *) pTable);
+ return (*__hashFunc.HashFirstEntry) (pTable);
}
unsigned int
xglHashNextEntry (const xglHashTablePtr pTable,
unsigned int key)
{
- return _mesa_HashNextEntry ((struct _mesa_HashTable *) pTable, key);
+ return (*__hashFunc.HashNextEntry) (pTable, key);
}
unsigned int
xglHashFindFreeKeyBlock (xglHashTablePtr pTable,
unsigned int numKeys)
{
- return _mesa_HashFindFreeKeyBlock ((struct _mesa_HashTable *) pTable,
- numKeys);
+ return (*__hashFunc.HashFindFreeKeyBlock) (pTable, numKeys);
}
-
-#endif
--- NEW FILE: xglloader.c ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: xglmodule.h ---
(This appears to be a binary file; contents omitted.)
Index: xglparse.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglparse.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xglparse.c 27 Apr 2005 09:29:33 -0000 1.5
+++ xglparse.c 23 Dec 2005 02:07:58 -0000 1.6
@@ -44,18 +44,17 @@
}
void
-xglParseScreen (xglScreenInfoPtr pScreenInfo,
- char *arg)
+xglParseScreen (char *arg)
{
char delim;
char save[1024];
int i, pixels, mm;
-
- pScreenInfo->width = 0;
- pScreenInfo->height = 0;
- pScreenInfo->widthMm = 0;
- pScreenInfo->heightMm = 0;
-
+
+ xglScreenInfo.width = 0;
+ xglScreenInfo.height = 0;
+ xglScreenInfo.widthMm = 0;
+ xglScreenInfo.heightMm = 0;
+
if (!arg)
return;
@@ -82,13 +81,13 @@
if (i == 0)
{
- pScreenInfo->width = pixels;
- pScreenInfo->widthMm = mm;
+ xglScreenInfo.width = pixels;
+ xglScreenInfo.widthMm = mm;
}
else
{
- pScreenInfo->height = pixels;
- pScreenInfo->heightMm = mm;
+ xglScreenInfo.height = pixels;
+ xglScreenInfo.heightMm = mm;
}
if (delim != 'x')
@@ -99,79 +98,66 @@
void
xglUseMsg (void)
{
- ErrorF ("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM] "
- "specify screen characteristics\n");
- ErrorF ("-fullscreen run fullscreen\n");
ErrorF ("-vertextype [short|float] set vertex data type\n");
- ErrorF ("-vbostream "
- "use vertex buffer objects for streaming of vertex data\n");
ErrorF ("-yinverted Y is upside-down\n");
- ErrorF ("-pbomask [1|4|8|16|32] "
- "set bpp's to use with pixel buffer objects\n");
ErrorF ("-lines "
"accelerate lines that are not vertical or horizontal\n");
+ ErrorF ("-vbo "
+ "use vertex buffer objects for streaming of vertex data\n");
+ ErrorF ("-pbomask [1|4|8|16|32] "
+ "set bpp's to use with pixel buffer objects\n");
+ ErrorF ("-fbo "
+ "use frame buffer objects for accelerate offscreen drawing\n");
}
int
-xglProcessArgument (xglScreenInfoPtr pScreenInfo,
- int argc,
- char **argv,
- int i)
+xglProcessArgument (int argc,
+ char **argv,
+ int i)
{
- if (!strcmp (argv[i], "-screen"))
+ if (!strcmp (argv[i], "-vertextype"))
{
if ((i + 1) < argc)
{
- xglParseScreen (pScreenInfo, argv[i + 1]);
+ if (!strcasecmp (argv[i + 1], "short"))
+ xglScreenInfo.geometryDataType = GEOMETRY_DATA_TYPE_SHORT;
+ else if (!strcasecmp (argv[i + 1], "float"))
+ xglScreenInfo.geometryDataType = GEOMETRY_DATA_TYPE_FLOAT;
}
else
return 1;
return 2;
}
- else if (!strcmp (argv[i], "-fullscreen"))
+ else if (!strcmp (argv[i], "-yinverted"))
{
- pScreenInfo->fullscreen = TRUE;
+ xglScreenInfo.yInverted = TRUE;
return 1;
}
- else if (!strcmp (argv[i], "-vertextype"))
- {
- if ((i + 1) < argc)
- {
- if (!strcasecmp (argv[i + 1], "short"))
- pScreenInfo->geometryDataType = GEOMETRY_DATA_TYPE_SHORT;
- else if (!strcasecmp (argv[i + 1], "float"))
- pScreenInfo->geometryDataType = GEOMETRY_DATA_TYPE_FLOAT;
- }
- else
- return 1;
-
- return 2;
- }
- else if (!strcmp (argv[i], "-vbostream"))
+ else if (!strcmp (argv[i], "-lines"))
{
- pScreenInfo->geometryUsage = GEOMETRY_USAGE_STREAM;
+ xglScreenInfo.lines = TRUE;
return 1;
}
- else if (!strcmp (argv[i], "-yinverted"))
+ else if (!strcmp (argv[i], "-vbo"))
{
- pScreenInfo->yInverted = TRUE;
+ xglScreenInfo.geometryUsage = GEOMETRY_USAGE_STREAM;
return 1;
}
else if (!strcmp (argv[i], "-pbomask"))
{
if ((i + 1) < argc)
{
- pScreenInfo->pboMask = atoi (argv[i + 1]);
+ xglScreenInfo.pboMask = atoi (argv[i + 1]);
}
else
return 1;
return 2;
}
- else if (!strcmp (argv[i], "-lines"))
+ else if (!strcmp (argv[i], "-fbo"))
{
- pScreenInfo->lines = TRUE;
+ xglScreenInfo.fbo = TRUE;
return 1;
}
Index: xglpixmap.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglpixmap.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- xglpixmap.c 7 Jun 2005 08:53:40 -0000 1.11
+++ xglpixmap.c 23 Dec 2005 02:07:58 -0000 1.12
@@ -114,6 +114,8 @@
if (width && height)
{
+ XGL_SCREEN_PRIV (pPixmap->drawable.pScreen);
+
if (width == 1 && height == 1)
{
pPixmapPriv->acceleratedTile = TRUE;
@@ -124,19 +126,27 @@
(POWER_OF_TWO (width) && POWER_OF_TWO (height)))
pPixmapPriv->acceleratedTile = TRUE;
}
-
- pPixmapPriv->target = xglPixmapTargetOut;
-
- /*
- * Do not allow accelerated drawing to bitmaps.
- */
- if (pPixmap->drawable.depth == 1)
- pPixmapPriv->target = xglPixmapTargetNo;
/*
- * Drawing to really small pixmaps is not worth accelerating.
+ * Accelerated drawing to pixmaps when using FBOs
*/
- if (width < 8 && height < 8)
+ if (pScreenPriv->fbo)
+ {
+ pPixmapPriv->target = xglPixmapTargetOut;
+
+ /*
+ * Do not allow accelerated drawing to bitmaps.
+ */
+ if (pPixmap->drawable.depth == 1)
+ pPixmapPriv->target = xglPixmapTargetNo;
+
+ /*
+ * Drawing to really small pixmaps is not worth accelerating.
+ */
+ if (width < 8 && height < 8)
+ pPixmapPriv->target = xglPixmapTargetNo;
+ }
+ else
pPixmapPriv->target = xglPixmapTargetNo;
}
}
Index: xglscreen.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglscreen.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- xglscreen.c 23 Dec 2005 00:08:35 -0000 1.10
+++ xglscreen.c 23 Dec 2005 02:07:58 -0000 1.11
@@ -134,8 +134,7 @@
}
Bool
-xglScreenInit (ScreenPtr pScreen,
- xglScreenInfoPtr pScreenInfo)
+xglScreenInit (ScreenPtr pScreen)
{
xglScreenPtr pScreenPriv;
int depth, bpp;
@@ -152,9 +151,9 @@
pScreenPriv->pScreenPixmap = NULL;
pScreenPriv->pVisual = &xglVisuals[0];
- pScreenPriv->drawable = pScreenInfo->drawable;
+ pScreenPriv->drawable = xglScreenInfo.drawable;
pScreenPriv->features =
- glitz_drawable_get_features (pScreenInfo->drawable);
+ glitz_drawable_get_features (xglScreenInfo.drawable);
depth = pScreenPriv->pVisual->pPixel->depth;
bpp = pScreenPriv->pVisual->pPixel->masks.bpp;
@@ -163,11 +162,12 @@
if (!pScreenPriv->pixmapFormats[depth].format)
return FALSE;
- pScreenPriv->geometryDataType = pScreenInfo->geometryDataType;
- pScreenPriv->geometryUsage = pScreenInfo->geometryUsage;
- pScreenPriv->yInverted = pScreenInfo->yInverted;
- pScreenPriv->pboMask = pScreenInfo->pboMask;
- pScreenPriv->lines = pScreenInfo->lines;
+ pScreenPriv->geometryDataType = xglScreenInfo.geometryDataType;
+ pScreenPriv->geometryUsage = xglScreenInfo.geometryUsage;
+ pScreenPriv->yInverted = xglScreenInfo.yInverted;
+ pScreenPriv->pboMask = xglScreenInfo.pboMask;
+ pScreenPriv->lines = xglScreenInfo.lines;
+ pScreenPriv->fbo = xglScreenInfo.fbo;
GEOMETRY_INIT (pScreen, &pScreenPriv->scratchGeometry,
GLITZ_GEOMETRY_TYPE_VERTEX,
@@ -176,7 +176,7 @@
pScreenPriv->surface =
glitz_surface_create (pScreenPriv->drawable,
pScreenPriv->pixmapFormats[depth].format,
- pScreenInfo->width, pScreenInfo->height,
+ xglScreenInfo.width, xglScreenInfo.height,
0, NULL);
if (!pScreenPriv->surface)
return FALSE;
@@ -191,9 +191,9 @@
monitorResolution = XGL_DEFAULT_DPI;
if (!fbSetupScreen (pScreen, NULL,
- pScreenInfo->width, pScreenInfo->height,
+ xglScreenInfo.width, xglScreenInfo.height,
monitorResolution, monitorResolution,
- pScreenInfo->width, bpp))
+ xglScreenInfo.width, bpp))
return FALSE;
pScreen->SaveScreen = xglSaveScreen;
@@ -202,9 +202,9 @@
pScreen->DestroyPixmap = xglDestroyPixmap;
if (!fbFinishScreenInit (pScreen, NULL,
- pScreenInfo->width, pScreenInfo->height,
+ xglScreenInfo.width, xglScreenInfo.height,
monitorResolution, monitorResolution,
- pScreenInfo->width, bpp))
+ xglScreenInfo.width, bpp))
return FALSE;
#ifdef MITSHM
@@ -276,11 +276,6 @@
return FALSE;
#endif
-#ifdef GLXEXT
- if (!xglInitVisualConfigs (pScreen))
- return FALSE;
-#endif
-
/* Damage is required */
DamageSetup (pScreen);
Index: xglsync.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xglsync.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- xglsync.c 7 Jun 2005 08:53:40 -0000 1.8
+++ xglsync.c 23 Dec 2005 02:07:58 -0000 1.9
@@ -293,7 +293,13 @@
switch (pPixmapPriv->target) {
case xglPixmapTargetNo:
+ break;
case xglPixmapTargetOut:
+ if (xglSyncSurface (pDrawable))
+ {
+ pPixmapPriv->target = xglPixmapTargetIn;
+ return TRUE;
+ }
break;
case xglPixmapTargetIn:
if (xglSyncSurface (pDrawable))
@@ -359,12 +365,47 @@
}
void
+xglAddBitDamage (DrawablePtr pDrawable,
+ RegionPtr pRegion)
+{
+ BoxPtr pBox;
+ BoxPtr pExt;
+ int nBox;
+
+ XGL_DRAWABLE_PIXMAP_PRIV (pDrawable);
+
+ pBox = REGION_RECTS (pRegion);
+ pExt = REGION_EXTENTS (pDrawable->pScreen, pRegion);
+ nBox = REGION_NUM_RECTS (pRegion);
+
+ if (pExt->x1 < pPixmapPriv->bitBox.x2 &&
+ pExt->y1 < pPixmapPriv->bitBox.y2 &&
+ pExt->x2 > pPixmapPriv->bitBox.x1 &&
+ pExt->y2 > pPixmapPriv->bitBox.y1)
+ {
+ while (nBox--)
+ {
+ if (pBox->x1 < pPixmapPriv->bitBox.x2 &&
+ pBox->y1 < pPixmapPriv->bitBox.y2 &&
+ pBox->x2 > pPixmapPriv->bitBox.x1 &&
+ pBox->y2 > pPixmapPriv->bitBox.y1)
+ {
+ pPixmapPriv->bitBox = miEmptyBox;
+ pPixmapPriv->allBits = FALSE;
+ return;
+ }
+
+ pBox++;
+ }
+ }
+}
+
+void
xglAddCurrentBitDamage (DrawablePtr pDrawable)
{
XGL_DRAWABLE_PIXMAP_PRIV (pDrawable);
- if (pPixmapPriv->target == xglPixmapTargetIn &&
- pPixmapPriv->damageBox.x1 < pPixmapPriv->bitBox.x2 &&
+ if (pPixmapPriv->damageBox.x1 < pPixmapPriv->bitBox.x2 &&
pPixmapPriv->damageBox.y1 < pPixmapPriv->bitBox.y2 &&
pPixmapPriv->damageBox.x2 > pPixmapPriv->bitBox.x1 &&
pPixmapPriv->damageBox.y2 > pPixmapPriv->bitBox.y1)
Index: xgltrap.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xgl/xgltrap.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xgltrap.c 7 Jun 2005 08:53:40 -0000 1.6
+++ xgltrap.c 23 Dec 2005 02:07:58 -0000 1.7
@@ -173,7 +173,7 @@
target = xglPrepareTarget (pDst->pDrawable);
if (nTrap > 1 && op != PictOpAdd && maskFormat &&
- (overlap || op != PictOpOver))
+ (!target || overlap || op != PictOpOver))
{
PixmapPtr pPixmap;
GCPtr pGC;
- Previous message: xserver/hw/xgl/egl Makefile.am, 1.3, 1.4 evdev.c, 1.3, 1.4 kinput.c,
1.1, 1.2 xegl.c, 1.5, 1.6 xegl.h, 1.1, 1.2 xeglinit.c, NONE, 1.1
- Next message: xserver/hw/xgl/glx/module Makefile.am, NONE, 1.1 xglxmodule.c, NONE,
1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xserver-commit
mailing list