From: Alyssa Rosenzweig Date: Fri, 5 Apr 2019 05:16:54 +0000 (+0000) Subject: panfrost/midgard: Add umin/umax opcodes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e7555b14b0e8136b3890ed7c2f6eb0918a9d844;p=mesa.git panfrost/midgard: Add umin/umax opcodes Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h index 54960c7e599..0ef5dac51d4 100644 --- a/src/gallium/drivers/panfrost/midgard/helpers.h +++ b/src/gallium/drivers/panfrost/midgard/helpers.h @@ -196,6 +196,8 @@ static unsigned alu_opcode_props[256] = { [midgard_alu_op_fmax] = UNITS_MUL | UNITS_ADD, [midgard_alu_op_imin] = UNITS_MOST, [midgard_alu_op_imax] = UNITS_MOST, + [midgard_alu_op_umin] = UNITS_MOST, + [midgard_alu_op_umax] = UNITS_MOST, [midgard_alu_op_fmov] = UNITS_ALL | QUIRK_FLIPPED_R24, [midgard_alu_op_fround] = UNITS_ADD, [midgard_alu_op_froundeven] = UNITS_ADD, diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h index 335ea5c56cc..0f963b9b3b1 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard.h +++ b/src/gallium/drivers/panfrost/midgard/midgard.h @@ -74,7 +74,9 @@ typedef enum { midgard_alu_op_isub = 0x46, midgard_alu_op_imul = 0x58, midgard_alu_op_imin = 0x60, + midgard_alu_op_umin = 0x61, midgard_alu_op_imax = 0x62, + midgard_alu_op_umax = 0x63, midgard_alu_op_iasr = 0x68, midgard_alu_op_ilsr = 0x69, midgard_alu_op_ishl = 0x6E, @@ -480,7 +482,9 @@ static char *alu_opcode_names[256] = { [midgard_alu_op_fdot4] = "fdot4", [midgard_alu_op_freduce] = "freduce", [midgard_alu_op_imin] = "imin", + [midgard_alu_op_umin] = "umin", [midgard_alu_op_imax] = "imax", + [midgard_alu_op_umax] = "umax", [midgard_alu_op_ishl] = "ishl", [midgard_alu_op_iasr] = "iasr", [midgard_alu_op_ilsr] = "ilsr", diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index 81e2a626c54..f91fa972246 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -1029,6 +1029,8 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr) ALU_CASE(fmax, fmax); ALU_CASE(imin, imin); ALU_CASE(imax, imax); + ALU_CASE(umin, umin); + ALU_CASE(umax, umax); ALU_CASE(fmov, fmov); ALU_CASE(ffloor, ffloor); ALU_CASE(fround_even, froundeven);