diff options
author | Nian Wu <nian.wu@intel.com> | 2007-03-17 17:00:25 +0800 |
---|---|---|
committer | Nian Wu <nian.wu@intel.com> | 2007-03-17 17:00:25 +0800 |
commit | 38889f5221821acf08365d3f332680707d4b9b5f (patch) | |
tree | 9afc0700b38efe8920b21cd22c4e5ba1cb21556d /src/mesa/main/framebuffer.c | |
parent | a02870f4f61a66560b3eb75f98a7fe57ebcb6ed6 (diff) | |
parent | 6a9b0cd0b43ba01b24871ec1fa155e192ddeaa56 (diff) |
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r-- | src/mesa/main/framebuffer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 3136a950e0..cd4f594aa2 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -647,7 +647,7 @@ update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb) const GLuint bufferBit = 1 << i; if (bufferBit & bufferMask) { struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; - if (rb) { + if (rb && rb->Width > 0 && rb->Height > 0) { fb->_ColorDrawBuffers[output][count] = rb; count++; } @@ -673,7 +673,10 @@ static void update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb) { (void) ctx; - if (fb->_ColorReadBufferIndex == -1 || fb->DeletePending) { + if (fb->_ColorReadBufferIndex == -1 || + fb->DeletePending || + fb->Width == 0 || + fb->Height == 0) { fb->_ColorReadBuffer = NULL; /* legal! */ } else { |