summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 0e6ca8ea1c2..82dd059e4b2 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -479,9 +479,12 @@ set_color_output(GLcontext *ctx, GLuint output, GLenum buffer,
/* not really needed, will be set later */
fb->_NumColorDrawBuffers[output] = 0;
- if (fb->Name == 0)
- /* Set traditional state var */
+ if (fb->Name == 0) {
+ /* Only set the per-context DrawBuffer state if we're currently
+ * drawing to a window system framebuffer.
+ */
ctx->Color.DrawBuffer[output] = buffer;
+ }
}