gallivm: avoid crashing in mod by 0 with llvmpipe
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sat, 16 Jan 2016 02:35:26 +0000 (03:35 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Sat, 16 Jan 2016 02:36:29 +0000 (03:36 +0100)
commite5fefe49f2f86b5125da87c44fe855fd6f3424fc
tree7e967a68e153310aad1f196469970e7ee109fb8f
parentd54a70aa18a0139a5eefbc5193fabaf739317533
gallivm: avoid crashing in mod by 0 with llvmpipe

This adds code that is basically the same as the code in umod, udiv and idiv.
However, unlike idiv we return -1.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c