panfrost/midgard: Add fround(_even), ftrunc, ffma
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 23 Feb 2019 01:12:10 +0000 (01:12 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 25 Feb 2019 02:36:26 +0000 (02:36 +0000)
commitc6be9969d25e60544a42a4cfd6062dd2a7e1ac1d
treeac9180a5a4fe19dab17cb6ec3a507c7bc0ef6b70
parent4a4726af3c86f1249f3761b982a2555623f315b9
panfrost/midgard: Add fround(_even), ftrunc, ffma

These ops were discovered by invoking the correspondingly names GLSL
functions. The rounding ops here behave exact as expected and are mapped
to their corresponding NIR ops where applicable. The ffma behaves as a
LUT instruction and requires some special argument packing (since
Midgard normally only allows for 2 arguments); this quirk will be
addressed in the future, but for now FMA is still lowered.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/helpers.h
src/gallium/drivers/panfrost/midgard/midgard.h
src/gallium/drivers/panfrost/midgard/midgard_compile.c