[Mesa-dev] [PATCH 1/2] gallium: add TGSI_OPCODE_FMA

Ilia Mirkin imirkin at alum.mit.edu
Mon Mar 2 11:50:00 PST 2015


On Mon, Mar 2, 2015 at 2:44 PM, Marek Olšák <maraeo at gmail.com> wrote:
> On Mon, Mar 2, 2015 at 5:09 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> Like Roland mentioned, you need to add DFMA, and the relevant cases to
>> glsl_to_tgsi_visitor::get_opcode so that it can be selected.
>
> I plan to add DFMA too, but it's really low priority for me right now.

OK, well, without DFMA, I'm fairly sure that this will break fp64 if
you add support for the opcode in softpipe (or I add it in nvc0).

> I can wait with this patch until it becomes high priority if needed.
> Or feel free to take over.
>
> I'll just change the definition of FMA to:
>
> "Perform a * b + c with no intermediate rounding step." (same as LLVM's FMA)

FWIW ARB_shader_precision allows fma() to do whatever it wants.

>
> That should be enough for everybody.
>
> Marek


More information about the mesa-dev mailing list