Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Roland Scheidegger
I think you just have to rely on the default of them being disabled. It is a bug of an app calling into mesa with non-default float state. Roland Am 28.02.2018 um 04:35 schrieb Jason Ekstrand: > On Tue, Feb 27, 2018 at 7:28 PM, Connor Abbott >

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Jason Ekstrand
On Tue, Feb 27, 2018 at 7:28 PM, Connor Abbott wrote: > Floating point division shouldn't signal on division by zero, it > should just return an appropriately-signed infinity, which seems like > a sane thing to do, and way better than just returning 0. I think that depends

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Jason Ekstrand
On Tue, Feb 27, 2018 at 7:20 PM, Timothy Arceri wrote: > On 28/02/18 14:13, Jason Ekstrand wrote: > >> On February 27, 2018 19:11:49 Jason Ekstrand >> wrote: >> >> On February 27, 2018 19:07:43 Timothy Arceri >>> wrote: >>>

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Connor Abbott
Floating point division shouldn't signal on division by zero, it should just return an appropriately-signed infinity, which seems like a sane thing to do, and way better than just returning 0. So we shouldn't do this with fdiv. I guess 0 is as good a result as any for the integer division, though

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Timothy Arceri
On 28/02/18 14:13, Jason Ekstrand wrote: On February 27, 2018 19:11:49 Jason Ekstrand wrote: On February 27, 2018 19:07:43 Timothy Arceri wrote: From the GLSL 4.60 spec Section 5.9 (Expressions):    "Dividing by zero does not cause an

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Jason Ekstrand
On February 27, 2018 19:11:49 Jason Ekstrand wrote: On February 27, 2018 19:07:43 Timothy Arceri wrote: From the GLSL 4.60 spec Section 5.9 (Expressions): "Dividing by zero does not cause an exception but does result in an unspecified

Re: [Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Jason Ekstrand
On February 27, 2018 19:07:43 Timothy Arceri wrote: 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"

[Mesa-dev] [PATCH] nir: fix divide by zero crash during constant folding

2018-02-27 Thread Timothy Arceri
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" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105271 ---