[Mesa-dev] [PATCH] nvc0/target: treat FMA like MAD
Ilia Mirkin
imirkin at alum.mit.edu
Sun Mar 19 00:11:43 UTC 2017
Oops :) This probably triggers a lot since they use fma() all over the
place. Internally these map to the same opcode, only the optimizer
treats them differently. Thanks!
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Sat, Mar 18, 2017 at 8:08 PM, Karol Herbst <karolherbst at gmail.com> wrote:
> helps mainly feral ported games
>
> shader-db changes:
> total instructions in shared programs : 3901147 -> 3842505 (-1.50%)
> total gprs used in shared programs : 471258 -> 467359 (-0.83%)
> total local used in shared programs : 27405 -> 27361 (-0.16%)
> total bytes used in shared programs : 35749888 -> 35214176 (-1.50%)
>
> local gpr inst bytes
> helped 17 1829 4091 4091
> hurt 4 44 3 3
>
> Signed-off-by: Karol Herbst <karolherbst at gmail.com>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
> index abdb328949..1c67e85d19 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
> @@ -105,6 +105,7 @@ static const struct opProperties _initProps[] =
> { OP_MAX, 0x3, 0x3, 0x0, 0x0, 0x2, 0x2 },
> { OP_MIN, 0x3, 0x3, 0x0, 0x0, 0x2, 0x2 },
> { OP_MAD, 0x7, 0x0, 0x0, 0x8, 0x6, 0x2 | 0x8 }, // special c[] constraint
> + { OP_FMA, 0x7, 0x0, 0x0, 0x8, 0x6, 0x2 | 0x8 }, // keep the same as OP_MAD
> { OP_SHLADD, 0x5, 0x0, 0x0, 0x0, 0x4, 0x6 },
> { OP_MADSP, 0x0, 0x0, 0x0, 0x0, 0x6, 0x2 },
> { OP_ABS, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0 },
> --
> 2.12.0
>
More information about the mesa-dev
mailing list