From 6d104cb932080c5c0d951fbc0ec6d30fb7ebef45 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 2 Nov 2006 12:02:13 +0000 Subject: merge current trunk into vbo branch --- src/mesa/drivers/dri/r300/radeon_context.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'src/mesa/drivers/dri/r300/radeon_context.c') diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c index 09321126d6..62a6e1e5f7 100644 --- a/src/mesa/drivers/dri/r300/radeon_context.c +++ b/src/mesa/drivers/dri/r300/radeon_context.c @@ -98,27 +98,11 @@ static const GLubyte *radeonGetString(GLcontext * ctx, GLenum name) } } - -/* Return the width and height of the given buffer. - */ -static void radeonGetBufferSize(GLframebuffer * buffer, - GLuint * width, GLuint * height) -{ - GET_CURRENT_CONTEXT(ctx); - radeonContextPtr radeon = RADEON_CONTEXT(ctx); - - LOCK_HARDWARE(radeon); - *width = radeon->dri.drawable->w; - *height = radeon->dri.drawable->h; - UNLOCK_HARDWARE(radeon); -} - - /* Initialize the driver's misc functions. */ static void radeonInitDriverFuncs(struct dd_function_table *functions) { - functions->GetBufferSize = radeonGetBufferSize; + functions->GetBufferSize = NULL; functions->GetString = radeonGetString; } @@ -158,7 +142,8 @@ GLboolean radeonInitContext(radeonContextPtr radeon, /* DRI fields */ radeon->dri.context = driContextPriv; radeon->dri.screen = sPriv; - radeon->dri.drawable = NULL; /* Set by XMesaMakeCurrent */ + radeon->dri.drawable = NULL; + radeon->dri.readable = NULL; radeon->dri.hwContext = driContextPriv->hHWContext; radeon->dri.hwLock = &sPriv->pSAREA->lock; radeon->dri.fd = sPriv->fd; @@ -282,12 +267,15 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, fprintf(stderr, "%s ctx %p\n", __FUNCTION__, radeon->glCtx); - if (radeon->dri.drawable != driDrawPriv) { + if ( (radeon->dri.drawable != driDrawPriv) + || (radeon->dri.readable != driReadPriv) ) { + driDrawableInitVBlank(driDrawPriv, radeon->vblank_flags, &radeon->vbl_seq); radeon->dri.drawable = driDrawPriv; - + radeon->dri.readable = driReadPriv; + r300UpdateWindow(radeon->glCtx); r300UpdateViewportOffset(radeon->glCtx); } -- cgit v1.2.3