diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-27 22:26:09 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-31 01:12:26 +0000 |
commit | 12a16f224767e3c235f79aa2dbacf1bfacdc4659 (patch) | |
tree | 2f6bc3fc4bab1a727efe1a647af1a1c0210bc6c3 | |
parent | c12a208d78203ccd5377b7b3291018c5d2f5b08a (diff) |
pan/bi: Structify fadd/min/max16
There is some quirky encoding here.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
-rw-r--r-- | src/panfrost/bifrost/bifrost.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 045295b6965..1a016286608 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -209,6 +209,25 @@ struct bifrost_fma_add { unsigned op : 6; } __attribute__((packed)); +#define BIFROST_FMA_OP_FMAX16 (0xC0 >> 2) +#define BIFROST_FMA_OP_FMIN16 (0xCC >> 2) +#define BIFROST_FMA_OP_FADD16 (0xD8 >> 2) + +struct bifrost_fma_add_minmax16 { + unsigned src0 : 3; + unsigned src1 : 3; + /* abs2 inferred as (src1 < src0) */ + unsigned abs1 : 1; + unsigned src0_neg : 1; + unsigned src1_neg : 1; + unsigned src0_swizzle : 2; + unsigned src1_swizzle : 2; + enum bifrost_outmod outmod : 2; + /* roundmode for add, min/max mode for min/max */ + unsigned mode : 2; + unsigned op : 6; +} __attribute__((packed)); + #define BIFROST_FMA_OP_FMA (0x00) struct bifrost_fma_fma { |