[Mesa-dev] [PATCH 1/5] prog_to_nir: OPCODE_EXP is not nir_op_fexp
Ian Romanick
idr at freedesktop.org
Thu May 7 15:00:13 PDT 2015
On 05/07/2015 07:30 AM, Jason Ekstrand wrote:
> On Wed, May 6, 2015 at 7:29 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Wed, May 6, 2015 at 7:09 PM, Ian Romanick <idr at freedesktop.org> wrote:
>>> From: Ian Romanick <ian.d.romanick at intel.com>
>>>
>>> It's a weird thing that provides some values related to 2**x. It's also
>>> already handled by a case in the switch.
>>>
>>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>>
>> The series is
>>
>> Reviewed-by: Matt Turner <mattst88 at gmail.com>
>
> I was going to complain about you making my SPIR-V -> NIR translator
> harder to write. But, based on the discussion by Ken and Ilia on IRC,
> it looks like basically no one's hardware does a base-e log. I'll
> just lower on-the-fly. I guess maybe we could do it with pow(x, e)
> but meh. If you'd like, the series is
Right. We currently unconditionally lower exp(x) to exp2(x * M_LOG2E)
in the GLSL IR lowering code. I believe we picked that lowering because
some older architectures lack a pow instruction. It may be worth trying
the other way to see if we get better code.
> Acked-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> I can't say I read it enough to call it a review but I glanced through
> it and it seems ok.
> --Jason
>
More information about the mesa-dev
mailing list