[Mesa-dev] [PATCH] mesa/clear: fix crashes with illegal clear tests.

Jose Fonseca jfonseca at vmware.com
Tue Jan 10 06:57:44 PST 2012



----- Original Message -----
> From: Dave Airlie <airlied at redhat.com>
> 
> Mesa shouldn't call into the drivers if there are no renderbuffers
> bound to the attachments for the buffers to be cleared.
> 
> Fixes a number of the clearbuffer-* tests on softpipe.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/main/clear.c |   15 +++++++++++----
>  1 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
> index bd5c012..a340f99 100644
> --- a/src/mesa/main/clear.c
> +++ b/src/mesa/main/clear.c
[...]
> @@ -592,6 +592,8 @@ _mesa_ClearBufferfi(GLenum buffer, GLint
> drawbuffer,
>                      GLfloat depth, GLint stencil)
>  {
>     GET_CURRENT_CONTEXT(ctx);
> +   int mask = 0;
> +

mask should be unsigned or GLbitfield.

Otherwise looks good to me.

Jose


More information about the mesa-dev mailing list