Make xf86glx.c unaware of Mesa internals

Use newly added XMesaCopyContext() and drop the GlxSetRenderTables() call
for Xgl, as this is now done inside XMesaForceCurrent(). This leaves xmesaP.h
but only for the declarations of the three XMesa/XFree86 functions. Also,
GlxSetRenderTables() stays but is only used in hw/xgl/glxext/ .

Also drop xf86glxint.h, no longer used.

Depends on mesa commit 7439a36785b6a2783e80a40a96c09db8f56dc2bc of 2007-03-30.
This commit is contained in:
George Sapountzis 2006-11-30 04:20:32 +02:00
parent 307d2b57bb
commit 76756f2756
5 changed files with 7 additions and 79 deletions

View File

@ -14,7 +14,6 @@ AM_CFLAGS = \
-I@MESA_SOURCE@/src/mesa/glapi \
-I@MESA_SOURCE@/src/mesa/main \
-DXFree86Server \
-DNO_LIBCWRAPPER \
@GLX_DEFINES@
# none yet

View File

@ -20,13 +20,11 @@ INCLUDES = -I@MESA_SOURCE@/include \
AM_CFLAGS = \
$(DIX_CFLAGS) \
-DXFree86Server \
@GLX_DEFINES@ \
-DXFree86Server
@GLX_DEFINES@
libX_la_SOURCES = xf86glx.c \
xf86glx_util.c \
xf86glx_util.h \
xf86glxint.h
xf86glx_util.h
nodist_libX_la_SOURCES = \
xm_api.c \

View File

@ -37,40 +37,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
#include <string.h>
#include <regionstr.h>
#include <resource.h>
#include <GL/gl.h>
#include <GL/glxint.h>
#include <GL/glxtokens.h>
#include <scrnintstr.h>
#include <windowstr.h>
#include <config.h>
#include <GL/xmesa.h>
#include <GL/internal/glcore.h>
#include <glxserver.h>
#include <glxscreens.h>
#include <glxdrawable.h>
#include <glxcontext.h>
#include <glxext.h>
#include <glxutil.h>
#include "context.h"
#include "xmesaP.h"
#include "context.h"
#include "glcontextmodes.h"
#include "os.h"
/*
* This define is for the glcore.h header file.
* If you add it here, then make sure you also add it in
* ../../../glx/Imakefile.
*/
#if 0
#define DEBUG
#include <GL/internal/glcore.h>
#undef DEBUG
#else
#include <GL/internal/glcore.h>
#endif
typedef struct __GLXMESAscreen __GLXMESAscreen;
typedef struct __GLXMESAcontext __GLXMESAcontext;
typedef struct __GLXMESAdrawable __GLXMESAdrawable;
@ -218,8 +197,7 @@ __glXMesaContextCopy(__GLXcontext *baseDst,
__GLXMESAcontext *dst = (__GLXMESAcontext *) baseDst;
__GLXMESAcontext *src = (__GLXMESAcontext *) baseSrc;
_mesa_copy_context(&src->xmesa->mesa, &dst->xmesa->mesa, mask);
return GL_TRUE;
return XMesaCopyContext(src->xmesa, dst->xmesa, mask);
}
static int
@ -227,7 +205,7 @@ __glXMesaContextForceCurrent(__GLXcontext *baseContext)
{
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
GlxSetRenderTables (context->xmesa->mesa.CurrentDispatch);
/* GlxSetRenderTables() call for XGL moved in XMesaForceCurrent() */
return XMesaForceCurrent(context->xmesa);
}

View File

@ -37,8 +37,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <gcstruct.h>
#include "pixmapstr.h"
#include "xf86glx_util.h"
#include <X11/Xmd.h>

View File

@ -1,45 +0,0 @@
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
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"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 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.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _XF86GLXINT_H_
#define _XF86GLXINT_H_
#include <miscstruct.h>
#include <GL/gl.h>
#include <GL/xmesa.h>
#endif /* _XF86GLXINT_H_ */