radeonsi: lower ffma in nir to mad.
authorDave Airlie <airlied@redhat.com>
Tue, 10 Oct 2017 03:23:40 +0000 (13:23 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 10 Oct 2017 21:33:32 +0000 (07:33 +1000)
This lowers ffma to a * b + c.

This seems like it should keep Marek happiest, so
we'd never get to the fma instruction emission code.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 82ed3d7b527417992dbe2a2ffc63d7bef6ed72a2..5b5f83aae10ba1045af726e82616ef134ff9487b 100644 (file)
@@ -795,6 +795,7 @@ static const struct nir_shader_compiler_options nir_options = {
        .lower_fsat = true,
        .lower_fdiv = true,
        .lower_sub = true,
+       .lower_ffma = true,
        .lower_pack_snorm_2x16 = true,
        .lower_pack_snorm_4x8 = true,
        .lower_pack_unorm_2x16 = true,