diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_framebuffer.c | 6 |
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. */ |