summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/radeon_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_context.c')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_context.c28
1 files changed, 8 insertions, 20 deletions
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);
}