On Thu,  2 Feb 2012 16:50:32 -0700, "Ian Romanick" <i...@freedesktop.org> wrote:
> From: Ian Romanick <ian.d.roman...@intel.com>
> 
> If size is small (such as 1),
> 
>    pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 1), 4);
> 
> makes pitch = 0.  Then
> 
>    height = size / pitch;
> 
> causes a division-by-zero exception.  If pitch is zero, set height to
> 1 and avoid the division.
> 
> This fixes piglit's bin/getteximage-formats test and glean's
> bufferObject test.

Looks simpler than my patch, while correct.

Reviewed-by: Eric Anholt <e...@anholt.net>

Attachment: pgpkzWzpt3Wb3.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to