[Mesa-dev] [PATCH 04/13] st/mesa: remove trailing NULL colorbuffers

Brian Paul brianp at vmware.com
Mon Apr 21 07:39:44 PDT 2014


On 04/20/2014 07:59 PM, Marek Olšák wrote:
> 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.
>       */
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list