panfrost/midgard: Add ult/ule ops
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 04:00:33 +0000 (04:00 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 23:36:09 +0000 (23:36 +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 01c88ed0fcf4837363567f59787916cce9dd3c1f..0d553d87917ddadbf5297642d11ba18fcced3cfc 100644 (file)
@@ -223,6 +223,8 @@ static unsigned alu_opcode_props[256] = {
         [midgard_alu_op_ine]            = UNITS_MOST,
         [midgard_alu_op_ilt]            = UNITS_MOST,
         [midgard_alu_op_ile]            = UNITS_MOST,
+        [midgard_alu_op_ule]            = UNITS_MOST,
+        [midgard_alu_op_ult]            = UNITS_MOST,
 
         [midgard_alu_op_icsel]          = UNITS_ADD,
         [midgard_alu_op_fcsel_i]        = UNITS_ADD,
index c40c94bc3783f87b3eaa1269211d769abdc5ad05..eab7cb5eec003c5290f95ba0de0ada43630c74d5 100644 (file)
@@ -103,6 +103,8 @@ typedef enum {
 
         midgard_alu_op_ieq        = 0xA0,
         midgard_alu_op_ine        = 0xA1,
+        midgard_alu_op_ult        = 0xA2,
+        midgard_alu_op_ule        = 0xA3,
         midgard_alu_op_ilt        = 0xA4,
         midgard_alu_op_ile        = 0xA5,
         midgard_alu_op_iball_eq   = 0xA8,
@@ -470,6 +472,8 @@ static char *alu_opcode_names[256] = {
         [midgard_alu_op_f2u8]       = "f2u8",
         [midgard_alu_op_ieq]        = "ieq",
         [midgard_alu_op_ine]        = "ine",
+        [midgard_alu_op_ult]        = "ult",
+        [midgard_alu_op_ule]        = "ule",
         [midgard_alu_op_ilt]        = "ilt",
         [midgard_alu_op_ile]        = "ile",
         [midgard_alu_op_iball_eq]   = "iball_eq",
index dac5eeb2c1bb613e2c94b453056ca8bc6d233af5..0c7bc28f00a1738245ecfa61f51695bfa0d1fa4e 100644 (file)
@@ -991,6 +991,7 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 ALU_CASE(ieq32, ieq);
                 ALU_CASE(ine32, ine);
                 ALU_CASE(ilt32, ilt);
+                ALU_CASE(ult32, ult);
 
                 /* We don't have a native b2f32 instruction. Instead, like many
                  * GPUs, we exploit booleans as 0/~0 for false/true, and