[Mesa-dev] [PATCH 1/1] mesa: Call updated_drawbuffers() if the buffer count changes in _mesa_drawbuffers().

Ian Romanick idr at freedesktop.org
Mon Jul 25 17:21:20 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/25/2011 01:23 PM, Henri Verbeet wrote:
> Without this we'd miss an update when doing a sequence like {COLOR0, COLOR1},
> {COLOR0}, {COLOR0, COLOR1}.

Is there a piglit test to reproduce this failure?

> NOTE: This is a candidate for the 7.10 and 7.11 branches.
> 
> Signed-off-by: Henri Verbeet <hverbeet at gmail.com>
> ---
>  src/mesa/main/buffers.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index a75c9c2..88fe0b1 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -445,7 +445,10 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
>           fb->ColorDrawBuffer[buf] = GL_NONE;
>           buf++;
>        }
> -      fb->_NumColorDrawBuffers = count;
> +      if (fb->_NumColorDrawBuffers != count) {
> +         updated_drawbuffers(ctx);
> +         fb->_NumColorDrawBuffers = count;
> +      }
>     }
>  
>     if (fb->Name == 0) {

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4uCIAACgkQX1gOwKyEAw/VgQCfVxBQwFzcyHf+k2fDf97r+PWF
fu0AoIQle0PGtvHCxtI16DgNqStW+1n8
=wMuo
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list