gallivm/nir: handle mod 0 better.
authorDave Airlie <airlied@redhat.com>
Wed, 26 Feb 2020 02:13:13 +0000 (12:13 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 23:20:01 +0000 (23:20 +0000)
commit2b155b1086121ec1d6bcd3598a835c68617d9aca
tree286454fffaf850ce90f174cbee4e20fd949e9afb
parent5370c685da4790834671e88bedbb0f15610e9bef
gallivm/nir: handle mod 0 better.

I haven't seen this crash but TGSI does it so best align with
it to avoid future issues.

Fixes: 44a6b0107b3J (gallivm: add nir->llvm translation (v2))
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3956>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3956>
src/gallium/auxiliary/gallivm/lp_bld_nir.c