summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index eb5f783cecb..b195c55b347 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -113,6 +113,12 @@ update_framebuffer_state( struct st_context *st )
pipe_surface_reference(&framebuffer->cbufs[i], NULL);
}
+ /* Remove trailing GL_NONE draw buffers. */
+ while (framebuffer->nr_cbufs &&
+ !framebuffer->cbufs[framebuffer->nr_cbufs-1]) {
+ framebuffer->nr_cbufs--;
+ }
+
/*
* Depth/Stencil renderbuffer/surface.
*/