llvmpipe: Fix zero-division in llvmpipe_texture_layout()
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Jun 2014 00:03:07 +0000 (02:03 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 25 Jun 2014 00:15:49 +0000 (02:15 +0200)
commit6b8b17153ab27b2bc7221df974a5872805f528b1
treeafc9708c29ae14325bdd8984c83f12397a31248b
parent48f1143c64e46b3d11dc318d7825b6167a2b78e5
llvmpipe: Fix zero-division in llvmpipe_texture_layout()

Fix the crash of "gnome-control-center info" invocation on QEMU where
zero height is passed at init.

(sroland: simplify logic by eliminating the div altogether, using 64bit mul.)

Fixes: https://bugzilla.novell.com/show_bug.cgi?id=879462
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/llvmpipe/lp_texture.c