diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-07-24 09:17:59 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-07-24 09:17:59 -0600 |
commit | 5b737b7df21b418c71f71af987a20c495b1133f8 (patch) | |
tree | 6aa3a54cb5d3c43f789488147f3b61b56e09c5fc /src/mesa/main/context.c | |
parent | f0636d9653d142bdf71475d2d2066f5c7c436978 (diff) | |
parent | 98eaf5503d0d7c4f18fab6910a08aba7a3d08639 (diff) |
Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 21adcf3210..2ad1badac7 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1495,9 +1495,20 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, */ if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer); + /* fix up the fb fields - these will end up wrong otherwise + if the DRIdrawable changes, and someone may rely on them. + */ + /* What a mess!?! */ + int i; + GLenum buffers[MAX_DRAW_BUFFERS]; + for(i = 0; i < newCtx->Const.MaxDrawBuffers; i++) { + buffers[i] = newCtx->Color.DrawBuffer[i]; + } + _mesa_drawbuffers(newCtx, newCtx->Const.MaxDrawBuffers, buffers, NULL); } if (!newCtx->ReadBuffer || newCtx->ReadBuffer->Name == 0) { _mesa_reference_framebuffer(&newCtx->ReadBuffer, readBuffer); + _mesa_ReadBuffer(newCtx->Pixel.ReadBuffer); } newCtx->NewState |= _NEW_BUFFERS; |