From: Alyssa Rosenzweig Date: Fri, 1 May 2020 22:06:49 +0000 (-0400) Subject: pan/bi: Structify DISCARD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20cb039457d79dd88aebff7e92cb223ae20b83d0;p=mesa.git pan/bi: Structify DISCARD Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index c4fd86b72bc..be0c8dfdab9 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -166,6 +166,26 @@ struct bifrost_add_inst { unsigned op : 17; } __attribute__((packed)); +#define BIFROST_ADD_OP_DISCARD (0x19100 >> 8) + +enum bifrost_discard_cond { + BIFROST_DISCARD_FEQ = 0, + BIFROST_DISCARD_FNE = 1, + BIFROST_DISCARD_FLE = 2, + BIFROST_DISCARD_FLT = 3, +}; + +struct bifrost_add_discard { + unsigned src0 : 3; + unsigned src1 : 3; + enum bifrost_discard_cond cond : 2; + /* Zero for fp32 */ + unsigned src0_select : 1; + unsigned src1_select : 1; + unsigned fp32 : 1; + unsigned op : 9; +} __attribute__((packed)); + #define BIFROST_ADD_OP_LD_UBO_1 (0x0c1a0 >> 3) #define BIFROST_ADD_OP_LD_UBO_2 (0x0c1e0 >> 3) #define BIFROST_ADD_OP_LD_UBO_3 (0x0caa0 >> 3) diff --git a/src/panfrost/bifrost/disassemble.c b/src/panfrost/bifrost/disassemble.c index 38fcb8adc85..73d773758ce 100644 --- a/src/panfrost/bifrost/disassemble.c +++ b/src/panfrost/bifrost/disassemble.c @@ -1109,7 +1109,7 @@ static const struct add_op_info add_op_infos[] = { { 0x17dd0, "ADD.i32.u16.Y", ADD_TWO_SRC }, { 0x18000, "LD_VAR_ADDR", ADD_VARYING_ADDRESS, false }, { 0x19100, "DISCARD.FEQ.f16", ADD_TWO_SRC, false }, - { 0x19188, "DISCARD.FNE.f16", ADD_TWO_SRC, false }, + { 0x19108, "DISCARD.FNE.f16", ADD_TWO_SRC, false }, { 0x19110, "DISCARD.FLE.f16", ADD_TWO_SRC, false }, { 0x19118, "DISCARD.FLT.f16", ADD_TWO_SRC, false }, { 0x19180, "DISCARD.FEQ.f32", ADD_TWO_SRC, false },