nir: fix interger divide by zero crash during constant folding
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 28 Feb 2018 03:33:55 +0000 (14:33 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 28 Feb 2018 04:55:39 +0000 (15:55 +1100)
commit0c1f37cc2d8555223ade73b244a3ee374be8d9cd
treedcd01aa3f2f4be481d9ce66428fe812754798555
parent086c88551d286cf29a2414227fc3a6f4b0c9c455
nir: fix interger divide by zero crash during constant folding

From the GLSL 4.60 spec Section 5.9 (Expressions):

   "Dividing by zero does not cause an exception but does result in
    an unspecified value."

Fixes: 89285e4d47a6 "nir: add new constant folding infrastructure"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105271
src/compiler/nir/nir_opcodes.py