diff options
author | alanh <alanh> | 2002-02-21 11:42:58 +0000 |
---|---|---|
committer | alanh <alanh> | 2002-02-21 11:42:58 +0000 |
commit | 2d199d5213980b750d501173dd77ba197e3d630d (patch) | |
tree | 4486743646aea7423d4720f51320355d5c0f0db6 /xc/extras/Mesa/src/X | |
parent | 8ff570ee91379ead89e7b9141cdedda23ca60de9 (diff) |
merge in current Mesa-4.0.x branch code
Diffstat (limited to 'xc/extras/Mesa/src/X')
-rw-r--r-- | xc/extras/Mesa/src/X/fakeglx.c | 8 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxapi.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxapi.h | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxheader.h | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/realglx.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/realglx.h | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xfonts.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xfonts.h | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_api.c | 37 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_dd.c | 11 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_line.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_span.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_tri.c | 2 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xmesaP.h | 7 |
14 files changed, 47 insertions, 36 deletions
diff --git a/xc/extras/Mesa/src/X/fakeglx.c b/xc/extras/Mesa/src/X/fakeglx.c index 59f8fdcf6..2e85819cd 100644 --- a/xc/extras/Mesa/src/X/fakeglx.c +++ b/xc/extras/Mesa/src/X/fakeglx.c @@ -1,10 +1,10 @@ -/* $Id: fakeglx.c,v 1.16 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: fakeglx.c,v 1.17 2002/02/21 11:43:05 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 4.0.1 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -66,7 +66,7 @@ #define SERVER_MINOR_VERSION 4 /* This is appended onto the glXGetClient/ServerString version strings. */ -#define MESA_GLX_VERSION "Mesa 4.0.1" +#define MESA_GLX_VERSION "Mesa 4.0.2" /* Who implemented this GLX? */ #define VENDOR "Brian Paul" diff --git a/xc/extras/Mesa/src/X/glxapi.c b/xc/extras/Mesa/src/X/glxapi.c index 2a9e26861..6b3b0f25f 100644 --- a/xc/extras/Mesa/src/X/glxapi.c +++ b/xc/extras/Mesa/src/X/glxapi.c @@ -1,4 +1,4 @@ -/* $Id: glxapi.c,v 1.8 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: glxapi.c,v 1.9 2002/02/21 11:43:05 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/glxapi.h b/xc/extras/Mesa/src/X/glxapi.h index 7db20d21a..bc5c71977 100644 --- a/xc/extras/Mesa/src/X/glxapi.h +++ b/xc/extras/Mesa/src/X/glxapi.h @@ -1,4 +1,4 @@ -/* $Id: glxapi.h,v 1.8 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: glxapi.h,v 1.9 2002/02/21 11:43:05 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/glxheader.h b/xc/extras/Mesa/src/X/glxheader.h index 24e8b6994..3bbb26c4f 100644 --- a/xc/extras/Mesa/src/X/glxheader.h +++ b/xc/extras/Mesa/src/X/glxheader.h @@ -1,4 +1,4 @@ -/* $Id: glxheader.h,v 1.6 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: glxheader.h,v 1.7 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/realglx.c b/xc/extras/Mesa/src/X/realglx.c index 291e93cd8..07160645a 100644 --- a/xc/extras/Mesa/src/X/realglx.c +++ b/xc/extras/Mesa/src/X/realglx.c @@ -1,4 +1,4 @@ -/* $Id: realglx.c,v 1.5 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: realglx.c,v 1.6 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/realglx.h b/xc/extras/Mesa/src/X/realglx.h index 59d2539d1..94aa3b1de 100644 --- a/xc/extras/Mesa/src/X/realglx.h +++ b/xc/extras/Mesa/src/X/realglx.h @@ -1,4 +1,4 @@ -/* $Id: realglx.h,v 1.5 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: realglx.h,v 1.6 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xfonts.c b/xc/extras/Mesa/src/X/xfonts.c index c8bc65d0c..147384995 100644 --- a/xc/extras/Mesa/src/X/xfonts.c +++ b/xc/extras/Mesa/src/X/xfonts.c @@ -1,4 +1,4 @@ -/* $Id: xfonts.c,v 1.10 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: xfonts.c,v 1.11 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xfonts.h b/xc/extras/Mesa/src/X/xfonts.h index c206c48b2..0d778610f 100644 --- a/xc/extras/Mesa/src/X/xfonts.h +++ b/xc/extras/Mesa/src/X/xfonts.h @@ -1,4 +1,4 @@ -/* $Id: xfonts.h,v 1.2 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: xfonts.h,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xm_api.c b/xc/extras/Mesa/src/X/xm_api.c index a8b96e18b..5149f759f 100644 --- a/xc/extras/Mesa/src/X/xm_api.c +++ b/xc/extras/Mesa/src/X/xm_api.c @@ -1,10 +1,10 @@ -/* $Id: xm_api.c,v 1.2 2002/02/14 01:59:35 dawes Exp $ */ +/* $Id: xm_api.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1306,23 +1306,31 @@ static GLboolean initialize_visual_and_buffer( int client, #endif XMesaSetFunction( v->display, b->gc, GXcopy ); + /* cleargc - for glClear() */ +#ifdef XFree86Server + b->cleargc = CreateScratchGC(v->display, window->depth); +#else + b->cleargc = XCreateGC( v->display, window, 0, NULL ); +#endif + XMesaSetFunction( v->display, b->cleargc, GXcopy ); + /* * Don't generate Graphics Expose/NoExpose events in swapbuffers(). * Patch contributed by Michael Pichler May 15, 1995. */ #ifdef XFree86Server - b->cleargc = CreateScratchGC(v->display, window->depth); + b->swapgc = CreateScratchGC(v->display, window->depth); { CARD32 v[1]; v[0] = FALSE; - dixChangeGC(NullClient, b->cleargc, GCGraphicsExposures, v, NULL); + dixChangeGC(NullClient, b->swapgc, GCGraphicsExposures, v, NULL); } #else gcvalues.graphics_exposures = False; - b->cleargc = XCreateGC( v->display, window, + b->swapgc = XCreateGC( v->display, window, GCGraphicsExposures, &gcvalues); #endif - XMesaSetFunction( v->display, b->cleargc, GXcopy ); + XMesaSetFunction( v->display, b->swapgc, GXcopy ); /* * Set fill style and tile pixmap once for all for HPCR stuff * (instead of doing it each time in clear_color_HPCR_pixmap()) @@ -2022,6 +2030,7 @@ void XMesaDestroyBuffer( XMesaBuffer b ) if (b->gc) XMesaFreeGC( b->xm_visual->display, b->gc ); if (b->cleargc) XMesaFreeGC( b->xm_visual->display, b->cleargc ); + if (b->swapgc) XMesaFreeGC( b->xm_visual->display, b->swapgc ); if (b->backimage) { #if defined(USE_XSHM) && !defined(XFree86Server) @@ -2396,7 +2405,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) if (b->shm) { /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ XShmPutImage( b->xm_visual->display, b->frontbuffer, - b->cleargc, + b->swapgc, b->backimage, 0, 0, 0, 0, b->width, b->height, False ); /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ @@ -2406,7 +2415,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) { /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ XMesaPutImage( b->xm_visual->display, b->frontbuffer, - b->cleargc, + b->swapgc, b->backimage, 0, 0, 0, 0, b->width, b->height ); /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ @@ -2418,7 +2427,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) XMesaCopyArea( b->xm_visual->display, b->backpixmap, /* source drawable */ b->frontbuffer, /* dest. drawable */ - b->cleargc, + b->swapgc, 0, 0, b->width, b->height, /* source region */ 0, 0 /* dest region */ ); @@ -2462,7 +2471,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) if (b->shm) { /* XXX assuming width and height aren't too large! */ XShmPutImage( b->xm_visual->display, b->frontbuffer, - b->cleargc, + b->swapgc, b->backimage, x, yTop, x, yTop, width, height, False ); /* wait for finished event??? */ @@ -2472,7 +2481,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) { /* XXX assuming width and height aren't too large! */ XMesaPutImage( b->xm_visual->display, b->frontbuffer, - b->cleargc, + b->swapgc, b->backimage, x, yTop, x, yTop, width, height ); } @@ -2482,7 +2491,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) XMesaCopyArea( b->xm_visual->display, b->backpixmap, /* source drawable */ b->frontbuffer, /* dest. drawable */ - b->cleargc, + b->swapgc, x, yTop, width, height, /* source region */ x, yTop /* dest region */ ); @@ -2596,7 +2605,7 @@ void XMesaGarbageCollect( void ) XMesaBuffer b, next; for (b=XMesaBufferList; b; b=next) { next = b->Next; - if (!b->pixmap_flag) { + if (b->display && b->frontbuffer && !b->pixmap_flag) { #ifdef XFree86Server /* NOT_NEEDED */ #else diff --git a/xc/extras/Mesa/src/X/xm_dd.c b/xc/extras/Mesa/src/X/xm_dd.c index b60c1a0e6..e226d63b5 100644 --- a/xc/extras/Mesa/src/X/xm_dd.c +++ b/xc/extras/Mesa/src/X/xm_dd.c @@ -1,10 +1,10 @@ -/* $Id: xm_dd.c,v 1.2 2002/02/14 01:59:36 dawes Exp $ */ +/* $Id: xm_dd.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -267,6 +267,7 @@ index_mask( GLcontext *ctx, GLuint mask ) else { m = (unsigned long) mask; } + XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } @@ -281,8 +282,7 @@ color_mask(GLcontext *ctx, int xclass = GET_VISUAL_CLASS(xmesa->xm_visual); (void) amask; - if (xmesa->xm_buffer->buffer != XIMAGE - && (xclass == TrueColor || xclass == DirectColor)) { + if (xclass == TrueColor || xclass == DirectColor) { unsigned long m; if (rmask && gmask && bmask) { m = ((unsigned long)~0L); @@ -293,6 +293,7 @@ color_mask(GLcontext *ctx, if (gmask) m |= GET_GREENMASK(xmesa->xm_visual); if (bmask) m |= GET_BLUEMASK(xmesa->xm_visual); } + XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } diff --git a/xc/extras/Mesa/src/X/xm_line.c b/xc/extras/Mesa/src/X/xm_line.c index 0137c8b95..771353dc9 100644 --- a/xc/extras/Mesa/src/X/xm_line.c +++ b/xc/extras/Mesa/src/X/xm_line.c @@ -1,4 +1,4 @@ -/* $Id: xm_line.c,v 1.2 2002/02/14 01:59:36 dawes Exp $ */ +/* $Id: xm_line.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xm_span.c b/xc/extras/Mesa/src/X/xm_span.c index 416f17568..74329d3ff 100644 --- a/xc/extras/Mesa/src/X/xm_span.c +++ b/xc/extras/Mesa/src/X/xm_span.c @@ -1,4 +1,4 @@ -/* $Id: xm_span.c,v 1.2 2002/02/14 01:59:36 dawes Exp $ */ +/* $Id: xm_span.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xm_tri.c b/xc/extras/Mesa/src/X/xm_tri.c index 8aa92f0f0..ee38a1550 100644 --- a/xc/extras/Mesa/src/X/xm_tri.c +++ b/xc/extras/Mesa/src/X/xm_tri.c @@ -1,4 +1,4 @@ -/* $Id: xm_tri.c,v 1.2 2002/02/14 01:59:36 dawes Exp $ */ +/* $Id: xm_tri.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library diff --git a/xc/extras/Mesa/src/X/xmesaP.h b/xc/extras/Mesa/src/X/xmesaP.h index fe4e41765..037b28a5f 100644 --- a/xc/extras/Mesa/src/X/xmesaP.h +++ b/xc/extras/Mesa/src/X/xmesaP.h @@ -1,10 +1,10 @@ -/* $Id: xmesaP.h,v 1.15 2002/02/14 01:59:36 dawes Exp $ */ +/* $Id: xmesaP.h,v 1.16 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -190,6 +190,7 @@ struct xmesa_buffer { XMesaGC gc; /* scratch GC for span, line, tri drawing */ XMesaGC cleargc; /* GC for clearing the color buffer */ + XMesaGC swapgc; /* GC for swapping the color buffers */ /* The following are here instead of in the XMesaVisual * because they depend on the window's colormap. |