[Mesa-dev] [PATCH] glsl: always do sqrt(abs()) and inversesqrt(abs())

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 11 19:36:42 UTC 2017


On Wed, Jan 11, 2017 at 2:33 PM, Marek Olšák <maraeo at gmail.com> wrote:
> On Wed, Jan 11, 2017 at 7:34 PM, Erik Faye-Lund <kusmabite at gmail.com> wrote:
>> On Wed, Jan 11, 2017 at 7:33 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>>> On Wed, Jan 11, 2017 at 10:31 AM, Erik Faye-Lund <kusmabite at gmail.com>
>>> wrote:
>>>>
>>>> On Wed, Jan 11, 2017 at 7:22 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>>> > On Wed, Jan 11, 2017 at 7:09 PM, Jason Ekstrand <jason at jlekstrand.net>
>>>> > wrote:
>>>> > I agree with you completely, and I find it unfortunate too that we
>>>> > have to add the workaround to GLSL or radeonsi to align its behavior
>>>> > with closed drivers.
>>>>
>>>> Just for reference, I just tested what NVIDIA does on Windows, and
>>>> they *don't* seem to do inversesqrt(abs(x)) on my HW/driver.
>>>
>>>
>>> What about sqrt()?  Do they do abs for one and not the other?  Because that
>>> would be crazy but also possible.
>>
>> Not for sqrt either, it seems.
>
> I'm open to a drirc-based solution, but I'd also be OK with abs in
> radeonsi or GLSL. It's not like nouveau and r600g are gonna remove the
> ABS modifier

FWIW I'd be happy to drop the modifier in the nouveau backend if
that's the consensus opinion of how to handle this situation properly.

Mostly I'd prefer consistent handling across all drivers.

Cheers,

  -ilia


More information about the mesa-dev mailing list