[Mesa-dev] [PATCH 7/8] mesa: fix assertion in _mesa_drawbuffers()
Roland Scheidegger
sroland at vmware.com
Fri Aug 8 18:43:58 PDT 2014
Am 08.08.2014 23:20, schrieb Brian Paul:
> Fixes failed assertion when _mesa_update_draw_buffers() was called
> with GL_DRAW_BUFFER == GL_FRONT_AND_BACK. The piglit gl30basic hit
> this.
>
> Cc: "10.2" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/main/buffers.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index b13a7af..6b4fac9 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -494,10 +494,11 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
> }
>
> /*
> - * If n==1, destMask[0] may have up to four bits set.
> + * destMask[0] may have up to four bits set
> + * (ex: glDrawBuffer(GL_FRONT_AND_BACK)).
> * Otherwise, destMask[x] can only have one bit set.
> */
> - if (n == 1) {
> + if (_mesa_bitcount(destMask[0]) > 1) {
> GLuint count = 0, destMask0 = destMask[0];
> while (destMask0) {
> GLint bufIndex = ffs(destMask0) - 1;
>
Hmm I don't understand how that could fail. Either you have a winsys
fbo, in which case n has to be 1, or you have a user fbo, in which case
you can only have the single color_buffer_x bits.
What am I missing here?
Roland
More information about the mesa-dev
mailing list