[Mesa-dev] [PATCH 1/3] mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.

Brian Paul brianp at vmware.com
Thu Apr 7 17:43:23 PDT 2011


On 04/07/2011 03:50 PM, Henri Verbeet wrote:
> ---
>   src/mesa/main/buffers.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index 5c37f3d..96ee1ac 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -407,7 +407,6 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
>                  fb->_ColorDrawBufferIndexes[buf] = bufIndex;
>                  newState = GL_TRUE;
>               }
> -            fb->ColorDrawBuffer[buf] = buffers[buf];
>               count = buf + 1;
>            }
>            else {
> @@ -416,6 +415,7 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
>                  newState = GL_TRUE;
>               }
>            }
> +         fb->ColorDrawBuffer[buf] = buffers[buf];
>         }
>         /* set remaining outputs to -1 (GL_NONE) */
>         while (buf<  ctx->Const.MaxDrawBuffers) {

Looks good.  Nice find.

This should be tagged as a candidate for the 7.10 branch.

-Brian



More information about the mesa-dev mailing list