summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-06-16 07:31:58 -0600
committerBrian Paul <brianp@vmware.com>2011-06-16 07:31:58 -0600
commit296052681601f98e16c701299d2b2a6d9bd5eeab (patch)
treed10883a6f603dd469fd168e7daa91d9ed8e69d83 /src
parent016621ee142682153cb292cd3774e6d9377871ae (diff)
mesa: updated comments in _make_current()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/context.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ea13bdd6835..ef79f1f453c 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1430,7 +1430,8 @@ _mesa_make_current( struct gl_context *newCtx,
}
if (curCtx &&
- (curCtx->WinSysDrawBuffer || curCtx->WinSysReadBuffer) && /* make sure this context is valid for flushing */
+ (curCtx->WinSysDrawBuffer || curCtx->WinSysReadBuffer) &&
+ /* make sure this context is valid for flushing */
curCtx != newCtx)
_mesa_flush(curCtx);
@@ -1445,8 +1446,6 @@ _mesa_make_current( struct gl_context *newCtx,
_glapi_set_dispatch(newCtx->CurrentDispatch);
if (drawBuffer && readBuffer) {
- /* TODO: check if newCtx and buffer's visual match??? */
-
ASSERT(drawBuffer->Name == 0);
ASSERT(readBuffer->Name == 0);
_mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, drawBuffer);
@@ -1457,11 +1456,9 @@ _mesa_make_current( struct gl_context *newCtx,
* or not bound to a user-created FBO.
*/
if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) {
- /* KW: merge conflict here, revisit.
- */
- /* fix up the fb fields - these will end up wrong otherwise
- * if the DRIdrawable changes, and everything relies on them.
- * This is a bit messy (same as needed in _mesa_BindFramebufferEXT)
+ /* Update the FBO's list of drawbuffers/renderbuffers.
+ * For winsys FBOs this comes from the GL state (which may have
+ * changed since the last time this FBO was bound).
*/
unsigned int i;
GLenum buffers[MAX_DRAW_BUFFERS];