[Mesa-dev] [PATCH 04/13] st/mesa: remove trailing NULL colorbuffers
Marek Olšák
maraeo at gmail.com
Sun Apr 20 18:59:25 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
Cc: mesa-stable at lists.freedesktop.org
---
src/mesa/state_tracker/st_atom_framebuffer.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index 4c4f839..09e0d85 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -90,6 +90,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.
*/
--
1.8.3.2
More information about the mesa-dev
mailing list