From: Alyssa Rosenzweig Date: Mon, 6 Apr 2020 17:48:06 +0000 (-0400) Subject: pan/bi: Structify ADD unit add/min/max X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36e4c6b267bf1083efd3417beb333e43d28062d7;p=mesa.git pan/bi: Structify ADD unit add/min/max ..since it's missing for FMA Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index db173bb0645..88ed61601b2 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -133,6 +133,23 @@ struct bifrost_add_2src { unsigned op : 14; } __attribute__((packed)); +#define BIFROST_ADD_OP_FMAX32 (0x00) +#define BIFROST_ADD_OP_FMIN32 (0x01) +#define BIFROST_ADD_OP_FADD32 (0x02) + +struct bifrost_add_faddmin { + unsigned src0 : 3; + unsigned src1 : 3; + unsigned src1_abs : 1; + unsigned src0_neg : 1; + unsigned src1_neg : 1; + unsigned select : 2; + unsigned outmod : 2; + unsigned mode : 2; + unsigned src0_abs : 1; + unsigned op : 4; +} __attribute__((packed)); + #define BIFROST_ADD_OP_ST_VAR (0x19300 >> 8) struct bifrost_st_vary {