diff options
author | anholt <anholt> | 2003-02-21 07:15:40 +0000 |
---|---|---|
committer | anholt <anholt> | 2003-02-21 07:15:40 +0000 |
commit | 7ee9f8d25e3ffe804ca112e9f75cabdc676fbe4e (patch) | |
tree | 46c16ec3bb1a11c4d3be23861a09f9711acaad1f /xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c | |
parent | eb77d6f367c09f476fc06263d7653dd5b4aecf7f (diff) |
Merge from trunk to bsd-4-0-0-branch.bsd-4-0-0-20030220bsd-4-0-0-branch
Diffstat (limited to 'xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c')
-rw-r--r-- | xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c index 6a9bf0801..05cd31443 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c @@ -34,8 +34,6 @@ * */ -#include <X11/Xlibint.h> - #include "tdfx_dri.h" #include "tdfx_context.h" #include "tdfx_lock.h" @@ -119,22 +117,16 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) static GLboolean tdfxInitDriver( __DRIscreenPrivate *sPriv ) { - int major, minor, patch; - if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv ); } - /* Check the DRI version */ - if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { - if ( major != 4 || - minor < 0 ) { - __driUtilMessage( - "3dfx DRI driver expected DRI version 4.0.x " - "but got version %d.%d.%d", - major, minor, patch ); - return GL_FALSE; - } + /* Check the DRI externsion version */ + if ( sPriv->driMajor != 4 || sPriv->driMinor < 0 ) { + __driUtilMessage( "tdfx DRI driver expected DRI version 4.0.x " + "but got version %d.%d.%d", + sPriv->driMajor, sPriv->driMinor, sPriv->driPatch ); + return GL_FALSE; } /* Check that the DDX driver version is compatible */ @@ -167,8 +159,7 @@ tdfxInitDriver( __DRIscreenPrivate *sPriv ) static GLboolean -tdfxCreateBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, +tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, __DRIdrawablePrivate *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) @@ -196,9 +187,9 @@ tdfxDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) static void -tdfxSwapBuffers(Display *dpy, void *drawablePrivate) +tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) + { - __DRIdrawablePrivate *driDrawPriv = (__DRIdrawablePrivate*) drawablePrivate; GET_CURRENT_CONTEXT(ctx); tdfxContextPtr fxMesa = 0; GLframebuffer *mesaBuffer; @@ -221,7 +212,7 @@ tdfxSwapBuffers(Display *dpy, void *drawablePrivate) if ( curDrawPriv == driDrawPriv ) { /* swapping window bound to current context, flush first */ - _mesa_swapbuffers( ctx ); + _mesa_notifySwapBuffers( ctx ); LOCK_HARDWARE( fxMesa ); } else { @@ -300,21 +291,9 @@ tdfxSwapBuffers(Display *dpy, void *drawablePrivate) -/* This function is called by libGL.so as soon as libGL.so is loaded. - * This is where we'd register new extension functions with the dispatcher. - */ void __driRegisterExtensions( void ) { -#if 0 - /* Example. Also look in tdfx_dd.c for more details. */ - { - const int _gloffset_FooBarEXT = 555; /* just an example number! */ - if ( _glapi_add_entrypoint( "glFooBarEXT", _gloffset_FooBarEXT ) ) { - void *f = glXGetProcAddressARB( "glFooBarEXT" ); - assert( f ); - } - } -#endif + /* See r200 driver for info */ } static GLboolean |