gallivm/nir: wrap idiv to avoid divide by 0 (v2)
authorDave Airlie <airlied@redhat.com>
Fri, 13 Dec 2019 03:09:42 +0000 (13:09 +1000)
committerDave Airlie <airlied@redhat.com>
Sat, 21 Dec 2019 03:06:58 +0000 (13:06 +1000)
commitc717ac1247c3c7243af2f1b2732cccb882b75f11
tree05ddef4f7e5da72a98e5a6266147b05d74f2b55e
parent7d65614422736de32214fc28b0054692f4e5e48f
gallivm/nir: wrap idiv to avoid divide by 0 (v2)

This code is taken from the TGSI paths, and should fix the regression
seens with GLES2

v2: use the udiv path which has d3d10 defined return.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303>
src/gallium/auxiliary/gallivm/lp_bld_nir.c