diff options
author | brianp <brianp> | 2002-03-15 18:46:20 +0000 |
---|---|---|
committer | brianp <brianp> | 2002-03-15 18:46:20 +0000 |
commit | bf42a2367bb0299938cd744b1675cf9399012394 (patch) | |
tree | becb241914196cfc52120a3424f777ce613f6e58 /xc/extras/Mesa/src/X | |
parent | b55c695235403f8e9d868b2d48a765e24dd7fe09 (diff) |
Sync-up with latest Mesa 4.0.2 code:
- restore currentReadable code, protected by #ifdef GLX_BUILT_IN_XMESA.
- updated comments about DRI/Mesa GLX interaction
- removed dead code
- a few bug fixes for thread-safety
Diffstat (limited to 'xc/extras/Mesa/src/X')
-rw-r--r-- | xc/extras/Mesa/src/X/fakeglx.c | 6 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxapi.c | 144 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxapi.h | 20 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/glxheader.h | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/realglx.c | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/realglx.h | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xfonts.c | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xfonts.h | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_api.c | 71 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_dd.c | 5 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_line.c | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_span.c | 8 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xm_tri.c | 1 | ||||
-rw-r--r-- | xc/extras/Mesa/src/X/xmesaP.h | 2 |
14 files changed, 35 insertions, 228 deletions
diff --git a/xc/extras/Mesa/src/X/fakeglx.c b/xc/extras/Mesa/src/X/fakeglx.c index 52b5e0f27..03f8cd396 100644 --- a/xc/extras/Mesa/src/X/fakeglx.c +++ b/xc/extras/Mesa/src/X/fakeglx.c @@ -1,4 +1,3 @@ -/* $Id: fakeglx.c,v 1.18 2002/03/14 14:11:16 jensowen Exp $ */ /* * Mesa 3-D graphics library @@ -1233,8 +1232,9 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) { ((__GLXcontext *) ctx)->currentDpy = dpy; ((__GLXcontext *) ctx)->currentDrawable = draw; -#ifdef GLX_BUILT_IN_XMESA - printf("Set fake context ctx %p\n", ctx); +#ifndef GLX_BUILT_IN_XMESA + ((__GLXcontext *) ctx)->currentReadable = read; +#else __glXSetCurrentContext(ctx); #endif return True; diff --git a/xc/extras/Mesa/src/X/glxapi.c b/xc/extras/Mesa/src/X/glxapi.c index 8efcab422..4ddd7a92e 100644 --- a/xc/extras/Mesa/src/X/glxapi.c +++ b/xc/extras/Mesa/src/X/glxapi.c @@ -1,8 +1,7 @@ -/* $Id: glxapi.c,v 1.10 2002/03/14 14:11:16 jensowen Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * @@ -28,6 +27,7 @@ /* * This is the GLX API dispatcher. Calls to the glX* functions are * either routed to the real GLX encoders or to Mesa's pseudo-GLX functions. + * See the glxapi.h file for more details. */ @@ -35,7 +35,6 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -/*#include <dlfcn.h>*/ /* XXX not portable? */ #include "glapi.h" #include "glxapi.h" @@ -478,7 +477,7 @@ void glXDestroyWindow(Display *dpy, GLXWindow window) GLXDrawable glXGetCurrentReadDrawable(void) { __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext(); - return gc ? gc->currentDrawable : 0; + return gc ? gc->currentReadable : 0; } #endif @@ -1064,143 +1063,6 @@ _glxapi_set_no_op_table(struct _glxapi_table *t) } -#if 00 -/* - * Open the named library and use dlsym() to populate the given dispatch - * table with GLX function pointers. - * Return: true = all OK - * false = can't open libName or can't get required GLX function - */ -GLboolean -_glxapi_load_library_table(const char *libName, struct _glxapi_table *t) -{ - void *libHandle; - void **entry; /* used to avoid a lot of cast/type warnings */ - - libHandle = dlopen(libName, 0); - if (!libHandle) { - return GL_FALSE; - } - -#define GET_REQ_FUNCTION(ENTRY, NAME) \ - entry = (void **) &(t->ENTRY); \ - *entry = dlsym(libHandle, NAME); \ - if (!*entry) { \ - fprintf(stderr, "libGL Error: couldn't load %s from %s\n", \ - NAME, libName); \ - dlclose(libHandle); \ - return GL_FALSE; \ - } - - /* 1.0 and 1.1 functions */ - GET_REQ_FUNCTION(ChooseVisual, "glXChooseVisual"); - GET_REQ_FUNCTION(CopyContext, "glXCopyContext"); - GET_REQ_FUNCTION(CreateContext, "glXCreateContext"); - GET_REQ_FUNCTION(CreateGLXPixmap, "glXCreateGLXPixmap"); - GET_REQ_FUNCTION(DestroyContext, "glXDestroyContext"); - GET_REQ_FUNCTION(GetConfig, "glXGetConfig"); - GET_REQ_FUNCTION(IsDirect, "glXIsDirect"); - GET_REQ_FUNCTION(MakeCurrent, "glXMakeCurrent"); - GET_REQ_FUNCTION(QueryExtension, "glXQueryExtension"); - GET_REQ_FUNCTION(QueryVersion, "glXQueryVersion"); - GET_REQ_FUNCTION(SwapBuffers, "glXSwapBuffers"); - GET_REQ_FUNCTION(UseXFont, "glXUseXFont"); - GET_REQ_FUNCTION(WaitGL, "glXWaitGL"); - GET_REQ_FUNCTION(WaitX, "glXWaitX"); - GET_REQ_FUNCTION(GetClientString, "glXGetClientString"); - GET_REQ_FUNCTION(QueryExtensionsString, "glXQueryExtensionsString"); - GET_REQ_FUNCTION(QueryServerString, "glXQueryServerString"); - -#define GET_OPT_FUNCTION(ENTRY, NAME) \ - entry = (void **) &(t->ENTRY); \ - *entry = dlsym(libHandle, NAME); \ - if (!*entry) { \ - *entry = (void *) generic_no_op_func; \ - } - - /* 1.2, 1.3 and extensions */ - GET_OPT_FUNCTION(ChooseFBConfig, "glXChooseFBConfig"); - GET_OPT_FUNCTION(CreateNewContext, "glXCreateNewContext"); - GET_OPT_FUNCTION(CreatePbuffer, "glXCreatePbuffer"); - GET_OPT_FUNCTION(CreatePixmap, "glXCreatePixmap"); - GET_OPT_FUNCTION(CreateWindow, "glXCreateWindow"); - GET_OPT_FUNCTION(DestroyPbuffer, "glXDestroyPbuffer"); - GET_OPT_FUNCTION(DestroyPixmap, "glXDestroyPixmap"); - GET_OPT_FUNCTION(DestroyWindow, "glXDestroyWindow"); - GET_OPT_FUNCTION(GetFBConfigAttrib, "glXGetFBConfigAttrib"); - GET_OPT_FUNCTION(GetFBConfigs, "glXGetFBConfigs"); - GET_OPT_FUNCTION(GetSelectedEvent, "glXGetSelectedEvent"); - GET_OPT_FUNCTION(GetVisualFromFBConfig, "glXGetVisualFromFBConfig"); - GET_OPT_FUNCTION(MakeContextCurrent, "glXMakeContextCurrent"); - GET_OPT_FUNCTION(QueryContext, "glXQueryContext"); - GET_OPT_FUNCTION(QueryDrawable, "glXQueryDrawable"); - GET_OPT_FUNCTION(SelectEvent, "glXSelectEvent"); - /*** GLX_SGI_swap_control ***/ - GET_OPT_FUNCTION(SwapIntervalSGI, "glXSwapIntervalSGI"); - /*** GLX_SGI_video_sync ***/ - GET_OPT_FUNCTION(GetVideoSyncSGI, "glXGetVideoSyncSGI"); - GET_OPT_FUNCTION(WaitVideoSyncSGI, "glXWaitVideoSyncSGI"); - /*** GLX_SGI_make_current_read ***/ - GET_OPT_FUNCTION(MakeCurrentReadSGI, "glXMakeCurrentReadSGI"); - GET_OPT_FUNCTION(GetCurrentReadDrawableSGI, "glXGetCurrentReadDrawableSGI"); - /*** GLX_SGIX_video_source ***/ -#if defined(_VL_H) - GET_OPT_FUNCTION(CreateGLXVideoSourceSGIX, "glXCreateGLXVideoSourceSGIX"); - GET_OPT_FUNCTION(DestroyGLXVideoSourceSGIX, "glXDestroyGLXVideoSourceSGIX"); -#endif - /*** GLX_EXT_import_context ***/ - GET_OPT_FUNCTION(FreeContextEXT, "glXFreeContextEXT"); - GET_OPT_FUNCTION(GetContextIDEXT, "glXGetContextIDEXT"); - GET_OPT_FUNCTION(GetCurrentDisplayEXT, "glXGetCurrentDisplayEXT"); - GET_OPT_FUNCTION(ImportContextEXT, "glXImportContextEXT"); - GET_OPT_FUNCTION(QueryContextInfoEXT, "glXQueryContextInfoEXT"); - /*** GLX_SGIX_fbconfig ***/ - GET_OPT_FUNCTION(GetFBConfigAttribSGIX, "glXGetFBConfigAttribSGIX"); - GET_OPT_FUNCTION(ChooseFBConfigSGIX, "glXChooseFBConfigSGIX"); - GET_OPT_FUNCTION(CreateGLXPixmapWithConfigSGIX, "glXCreateGLXPixmapWithConfigSGIX"); - GET_OPT_FUNCTION(CreateContextWithConfigSGIX, "glXCreateContextWithConfigSGIX"); - GET_OPT_FUNCTION(GetVisualFromFBConfigSGIX, "glXGetVisualFromFBConfigSGIX"); - GET_OPT_FUNCTION(GetFBConfigFromVisualSGIX, "glXGetFBConfigFromVisualSGIX"); - /*** GLX_SGIX_pbuffer ***/ - GET_OPT_FUNCTION(CreateGLXPbufferSGIX, "glXCreateGLXPbufferSGIX"); - GET_OPT_FUNCTION(DestroyGLXPbufferSGIX, "glXDestroyGLXPbufferSGIX"); - GET_OPT_FUNCTION(QueryGLXPbufferSGIX, "glXQueryGLXPbufferSGIX"); - GET_OPT_FUNCTION(SelectEventSGIX, "glXSelectEventSGIX"); - GET_OPT_FUNCTION(GetSelectedEventSGIX, "glXGetSelectedEventSGIX"); - /*** GLX_SGI_cushion ***/ - GET_OPT_FUNCTION(CushionSGI, "glXCushionSGI"); - /*** GLX_SGIX_video_resize ***/ - GET_OPT_FUNCTION(BindChannelToWindowSGIX, "glXBindChannelToWindowSGIX"); - GET_OPT_FUNCTION(ChannelRectSGIX, "glXChannelRectSGIX"); - GET_OPT_FUNCTION(QueryChannelRectSGIX, "glXQueryChannelRectSGIX"); - GET_OPT_FUNCTION(QueryChannelDeltasSGIX, "glXQueryChannelDeltasSGIX"); - GET_OPT_FUNCTION(ChannelRectSyncSGIX, "glXChannelRectSyncSGIX"); - /*** GLX_SGIX_dmbuffer ***/ -#if defined (_DM_BUFFER_H_) - GET_OPT_FUNCTION(AssociateDMPbufferSGIX, "glXAssociateDMPbufferSGIX"); -#endif - /*** GLX_SGIX_swap_group ***/ - GET_OPT_FUNCTION(JoinSwapGroupSGIX, "glXJoinSwapGroupSGIX"); - /*** GLX_SGIX_swap_barrier ***/ - GET_OPT_FUNCTION(BindSwapBarrierSGIX, "glXBindSwapBarrierSGIX"); - GET_OPT_FUNCTION(QueryMaxSwapBarriersSGIX, "glXQueryMaxSwapBarriersSGIX"); - /*** GLX_SUN_get_transparent_index ***/ - GET_OPT_FUNCTION(GetTransparentIndexSUN, "glXGetTransparentIndexSUN"); - /*** GLX_MESA_copy_sub_buffer ***/ - GET_OPT_FUNCTION(CopySubBufferMESA, "glXCopySubBufferMESA"); - /*** GLX_MESA_release_buffers ***/ - GET_OPT_FUNCTION(ReleaseBuffersMESA, "glXReleaseBuffersMESA"); - /*** GLX_MESA_pixmap_colormap ***/ - GET_OPT_FUNCTION(CreateGLXPixmapMESA, "glXCreateGLXPixmapMESA"); - /*** GLX_MESA_set_3dfx_mode ***/ - GET_OPT_FUNCTION(Set3DfxModeMESA, "glXSet3DfxModeMESA"); - - return GL_TRUE; -} -#endif - - - struct name_address_pair { const char *Name; GLvoid *Address; diff --git a/xc/extras/Mesa/src/X/glxapi.h b/xc/extras/Mesa/src/X/glxapi.h index 4e902fbb3..31e257e6f 100644 --- a/xc/extras/Mesa/src/X/glxapi.h +++ b/xc/extras/Mesa/src/X/glxapi.h @@ -1,8 +1,7 @@ -/* $Id: glxapi.h,v 1.10 2002/03/14 14:11:16 jensowen Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * @@ -34,14 +33,21 @@ #ifdef GLX_BUILT_IN_XMESA -/* The GLX API dispatcher is being built into XFree86's libGL */ +/* The GLX API dispatcher (i.e. this code) is being built into XFree86's + * libGL so we'll use the __GLXContextRec defined in xc/lib/GL/glx/glxclient.h +*/ #include "glxclient.h" #else -/* The GLX API dispatcher is being built into stand-alone Mesa */ +/* The GLX API dispatcher (i.e. this code) is being built into stand-alone + * Mesa. We don't know anything about XFree86 or real GLX so we define a + * minimal __GLXContextRec here so some of the functions in this file can + * work properly. + */ typedef struct __GLXcontextRec { Display *currentDpy; GLboolean isDirect; GLXDrawable currentDrawable; + GLXDrawable currentReadable; XID xid; } __GLXcontext; #endif @@ -56,8 +62,10 @@ typedef struct __GLXcontextRec { * pseudo-GLX can be present at the same time. The former being used on * GLX-enabled X servers and the later on non-GLX X servers. * - * XXX Note that this hasn't actually been fully used yet in either Mesa or - * the DRI. Red Hat, however, has used it for their custom libGL. + * Red Hat has been using this since Red Hat Linux 7.0 (I think). + * This'll be a standard feature in XFree86 4.3. It basically allows one + * libGL to do both DRI-rendering and "fake GLX" rendering to X displays + * that lack the GLX extension. */ struct _glxapi_table { /*** GLX_VERSION_1_0 ***/ diff --git a/xc/extras/Mesa/src/X/glxheader.h b/xc/extras/Mesa/src/X/glxheader.h index 3bbb26c4f..39b9a0211 100644 --- a/xc/extras/Mesa/src/X/glxheader.h +++ b/xc/extras/Mesa/src/X/glxheader.h @@ -1,4 +1,3 @@ -/* $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 07160645a..c1ea49afd 100644 --- a/xc/extras/Mesa/src/X/realglx.c +++ b/xc/extras/Mesa/src/X/realglx.c @@ -1,4 +1,3 @@ -/* $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 94aa3b1de..05f46f547 100644 --- a/xc/extras/Mesa/src/X/realglx.h +++ b/xc/extras/Mesa/src/X/realglx.h @@ -1,4 +1,3 @@ -/* $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 147384995..d2a1a7a40 100644 --- a/xc/extras/Mesa/src/X/xfonts.c +++ b/xc/extras/Mesa/src/X/xfonts.c @@ -1,4 +1,3 @@ -/* $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 0d778610f..e36f42f81 100644 --- a/xc/extras/Mesa/src/X/xfonts.h +++ b/xc/extras/Mesa/src/X/xfonts.h @@ -1,4 +1,3 @@ -/* $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 5149f759f..388329c1d 100644 --- a/xc/extras/Mesa/src/X/xm_api.c +++ b/xc/extras/Mesa/src/X/xm_api.c @@ -1,4 +1,3 @@ -/* $Id: xm_api.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -23,7 +22,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - +/* $XFree86: xc/extras/Mesa/src/X/xm_api.c,v 1.2 2002/02/26 23:37:31 tsi Exp $ */ /* * This file contains the implementations of all the XMesa* functions. @@ -168,6 +167,8 @@ static short hpcr_rgbTbl[3][256] = { */ static void error( const char *msg ) { + (void)DitherValues; /* Muffle compiler */ + if (getenv("MESA_DEBUG")) fprintf( stderr, "X/Mesa error: %s\n", msg ); } @@ -1698,35 +1699,6 @@ void XMesaDestroyContext( XMesaContext c ) _mesa_destroy_context( c->gl_ctx ); } - /* - * XXX This code should really go away because the ancilliary data - * associated with a window/pixmap should not go away just because - * a context is destroyed. - */ -#if 0 - /* Destroy any buffers which are using this context. If we don't - * we may have dangling references. Hmm, maybe we should just - * set the buffer's context pointer to NULL instead of deleting it? - * Let's see if we get any bug reports... - * This contributed by Doug Rabson <dfr@calcaphon.com> - */ - { - XMesaBuffer b, next; - for (b = XMesaBufferList; b; b = next) { - next = b->Next; - if (!b->pixmap_flag) { -#ifndef XFree86Server - XSync(b->display, False); -#endif - if (b->xm_context == c) { - /* found a context created for this context */ - XMesaDestroyBuffer( b ); - } - } - } - } -#endif - FREE( c ); } @@ -1777,8 +1749,6 @@ XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, XMesaWindow w, return NULL; } - b->xm_context = NULL; /* Associate no context with this buffer */ - b->xm_visual = v; b->pixmap_flag = GL_FALSE; b->display = v->display; @@ -1925,8 +1895,6 @@ XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, assert(v); - b->xm_context = NULL; /* Associate no context with this buffer */ - b->xm_visual = v; b->pixmap_flag = GL_TRUE; b->display = v->display; @@ -1975,8 +1943,6 @@ XMesaBuffer XMesaCreatePBuffer( XMesaVisual v, XMesaColormap cmap, return NULL; } - b->xm_context = NULL; /* Associate no context with this buffer */ - b->xm_visual = v; b->pbuffer_flag = GL_TRUE; b->display = v->display; @@ -2057,9 +2023,6 @@ void XMesaDestroyBuffer( XMesaBuffer b ) XMesaDestroyImage( b->rowimage ); } - if (b->xm_context) - b->xm_context->xm_buffer = NULL; - free_xmesa_buffer(client, b); } @@ -2088,17 +2051,6 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer, if (drawBuffer->FXctx) { fxMesaMakeCurrent(drawBuffer->FXctx); - /* Disassociate drawBuffer's current context from drawBuffer */ - if (drawBuffer->xm_context) - drawBuffer->xm_context->xm_buffer = NULL; - - /* Disassociate old buffer from this context */ - if (c->xm_buffer) - c->xm_buffer->xm_context = NULL; - - /* Associate the context with this buffer */ - drawBuffer->xm_context = c; - c->xm_buffer = drawBuffer; c->xm_read_buffer = readBuffer; c->use_read_buffer = (drawBuffer != readBuffer); @@ -2114,16 +2066,6 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer, return GL_TRUE; } - /* Disassociate drawBuffer's current context from drawBuffer */ - if (drawBuffer->xm_context) - drawBuffer->xm_context->xm_buffer = NULL; - - /* Disassociate old buffer with this context */ - if (c->xm_buffer) - c->xm_buffer->xm_context = NULL; - - drawBuffer->xm_context = c; /* Associate the context with this buffer */ - c->xm_buffer = drawBuffer; c->xm_read_buffer = readBuffer; c->use_read_buffer = (drawBuffer != readBuffer); @@ -2288,12 +2230,13 @@ GLboolean XMesaSetFXmode( GLint mode ) */ static void FXgetImage( XMesaBuffer b ) { + GET_CURRENT_CONTEXT(ctx); static unsigned short pixbuf[MAX_WIDTH]; GLuint x, y; int xpos, ypos; XMesaWindow root; unsigned int bw, depth, width, height; - XMesaContext xmesa = (XMesaContext) b->xm_context->gl_ctx->DriverCtx; + XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; assert(xmesa->xm_buffer->FXctx); @@ -2385,7 +2328,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) /* If we're swapping the buffer associated with the current context * we have to flush any pending rendering commands first. */ - if (b->xm_context && b->xm_context->gl_ctx == ctx) + if (ctx && ctx->DrawBuffer == &(b->mesa_buffer)) _mesa_swapbuffers(ctx); if (b->db_state) { @@ -2451,7 +2394,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) /* If we're swapping the buffer associated with the current context * we have to flush any pending rendering commands first. */ - if (b->xm_context->gl_ctx == ctx) + if (ctx && ctx->DrawBuffer == &(b->mesa_buffer)) _mesa_swapbuffers(ctx); if (b->db_state) { diff --git a/xc/extras/Mesa/src/X/xm_dd.c b/xc/extras/Mesa/src/X/xm_dd.c index e226d63b5..dd3052a25 100644 --- a/xc/extras/Mesa/src/X/xm_dd.c +++ b/xc/extras/Mesa/src/X/xm_dd.c @@ -1,4 +1,3 @@ -/* $Id: xm_dd.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -23,7 +22,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - +/* $XFree86: xc/extras/Mesa/src/X/xm_dd.c,v 1.2 2002/02/26 23:37:31 tsi Exp $ */ #include "glxheader.h" #include "context.h" @@ -75,6 +74,8 @@ get_buffer_size( GLcontext *ctx, GLuint *width, GLuint *height ) winheight = xmesa->xm_buffer->frontbuffer->height; #endif + (void)kernel8; /* Muffle compiler */ + *width = winwidth; *height = winheight; diff --git a/xc/extras/Mesa/src/X/xm_line.c b/xc/extras/Mesa/src/X/xm_line.c index 771353dc9..a4d440faa 100644 --- a/xc/extras/Mesa/src/X/xm_line.c +++ b/xc/extras/Mesa/src/X/xm_line.c @@ -1,4 +1,3 @@ -/* $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 74329d3ff..26c5aa10f 100644 --- a/xc/extras/Mesa/src/X/xm_span.c +++ b/xc/extras/Mesa/src/X/xm_span.c @@ -1,4 +1,3 @@ -/* $Id: xm_span.c,v 1.3 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -23,7 +22,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - +/* $XFree86: xc/extras/Mesa/src/X/xm_span.c,v 1.3 2002/02/27 21:07:54 tsi Exp $ */ #include "glxheader.h" #include "context.h" @@ -186,6 +185,9 @@ static void write_span_TRUECOLOR_pixmap( RGBA_SPAN_ARGS ) XMesaDrawable buffer = xmesa->xm_buffer->buffer; XMesaGC gc = xmesa->xm_buffer->gc; register GLuint i; + + (void)DitherValues; /* Muffle compiler */ + y = FLIP(xmesa->xm_buffer, y); if (mask) { for (i=0;i<n;i++,x++) { @@ -3741,9 +3743,9 @@ static void read_color_span( const GLcontext *ctx, const GLubyte *pixelToG = xmesa->xm_visual->PixelToG; const GLubyte *pixelToB = xmesa->xm_visual->PixelToB; const GLushort *ptr2 = PIXELADDR2( source, x, y ); - const GLuint *ptr4 = (const GLuint *) ptr2; GLuint i; #if defined(__i386__) /* word stores don't have to be on 4-byte boundaries */ + const GLuint *ptr4 = (const GLuint *) ptr2; GLuint extraPixel = (n & 1); n -= extraPixel; for (i = 0; i < n; i += 2) { diff --git a/xc/extras/Mesa/src/X/xm_tri.c b/xc/extras/Mesa/src/X/xm_tri.c index ee38a1550..b5efc1f8e 100644 --- a/xc/extras/Mesa/src/X/xm_tri.c +++ b/xc/extras/Mesa/src/X/xm_tri.c @@ -1,4 +1,3 @@ -/* $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 037b28a5f..66acd0298 100644 --- a/xc/extras/Mesa/src/X/xmesaP.h +++ b/xc/extras/Mesa/src/X/xmesaP.h @@ -1,4 +1,3 @@ -/* $Id: xmesaP.h,v 1.16 2002/02/21 11:43:06 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -144,7 +143,6 @@ struct xmesa_buffer { GLboolean wasCurrent; /* was ever the current buffer? */ XMesaVisual xm_visual; /* the X/Mesa visual */ - XMesaContext xm_context; /* the context associated with this buffer */ XMesaDisplay *display; GLboolean pixmap_flag; /* is the buffer a Pixmap? */ GLboolean pbuffer_flag; /* is the buffer a Pbuffer? */ |