panfrost/midgard: Add umin/umax opcodes
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 5 Apr 2019 05:16:54 +0000 (05:16 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 7 Apr 2019 15:59:05 +0000 (15:59 +0000)
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

index 54960c7e5999196ce0f133814d6c8cd2ede33460..0ef5dac51d4bea50c9590de4b3944cbf2affae0a 100644 (file)
@@ -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,
index 335ea5c56cceef0729c529ab3765e6e61de27969..0f963b9b3b1632c4d7841fb6f9c05fdec4c9347b 100644 (file)
@@ -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",
index 81e2a626c543081b83364672020a3a6b7a3603bc..f91fa972246bef342e9880a5a4154c77e717ab04 100644 (file)
@@ -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);