diff options
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_context.c')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_context.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index 07d2cb1db5..a9163f49a8 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -23,19 +23,14 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.12 2003/05/08 09:25:35 herrb Exp $ */ -/* - * New fixes: - * Daniel Borca <dborca@users.sourceforge.net>, 19 Jul 2004 - * - * Original rewrite: - * Gareth Hughes <gareth@valinux.com>, 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes <gareth@valinux.com> - * Brian Paul <brianp@valinux.com> +/** + * \file tdfx_context.c + * Context management functions for 3Dfx hardware. * + * \author Gareth Hughes <gareth@valinux.com> (original rewrite 29 Sep - 1 Oct 2000) + * \author Brian Paul <brianp@valinux.com> + * \author Daniel Borca <dborca@users.sourceforge.net> (new fixes 19 Jul 2004) */ #include <dlfcn.h> @@ -65,6 +60,7 @@ #define need_GL_ARB_multisample /* #define need_GL_ARB_point_parameters */ +#define need_GL_ARB_occlusion_query #define need_GL_ARB_texture_compression #define need_GL_ARB_vertex_buffer_object /* #define need_GL_ARB_vertex_program */ @@ -87,6 +83,7 @@ const struct dri_extension card_extensions[] = { { "GL_ARB_multisample", GL_ARB_multisample_functions }, + { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { "GL_ARB_texture_mirrored_repeat", NULL }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, @@ -660,8 +657,10 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, GLcontext *newCtx = newFx->glCtx; GET_CURRENT_CONTEXT(curCtx); - if ( newFx->driDrawable != driDrawPriv ) { + if ((newFx->driDrawable != driDrawPriv) + || (newFx->driReadable != driReadPriv)) { newFx->driDrawable = driDrawPriv; + newFx->driReadable = driReadPriv; newFx->dirty = ~0; } else { @@ -679,6 +678,11 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, newFx->dirty = ~0; } + driUpdateFramebufferSize(newCtx, driDrawPriv); + if (driDrawPriv != driReadPriv) { + driUpdateFramebufferSize(newCtx, driReadPriv); + } + if ( !newFx->Glide.Initialized ) { if ( !tdfxInitContext( driDrawPriv, newFx ) ) return GL_FALSE; |