pan/bi: Drop use of MALI_POSITIVE
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Aug 2020 22:09:51 +0000 (18:09 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 Aug 2020 23:54:24 +0000 (23:54 +0000)
Contributing to a dep on the main cmdstream. It's a fancy word for
subtract one...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>

src/panfrost/bifrost/bi_pack.c

index d4351e25aa56c470c62cedce9b8d37c6459d07da..d4a61a2671bf61e7e921bcff09ffb3bd44ca3c4a 100644 (file)
@@ -1219,7 +1219,7 @@ bi_pack_add_ld_vary(bi_clause *clause, bi_instruction *ins, bi_registers *regs)
         struct bifrost_ld_var pack = {
                 .src0 = bi_get_src(ins, regs, 1),
                 .addr = packed_addr,
-                .channels = MALI_POSITIVE(channels),
+                .channels = channels - 1,
                 .interp_mode = ins->load_vary.interp_mode,
                 .reuse = ins->load_vary.reuse,
                 .flat = ins->load_vary.flat,
@@ -1352,7 +1352,7 @@ bi_pack_add_ld_attr(bi_clause *clause, bi_instruction *ins, bi_registers *regs)
                 .src0 = bi_get_src(ins, regs, 1),
                 .src1 = bi_get_src(ins, regs, 2),
                 .location = bi_get_immediate(ins, 0),
-                .channels = MALI_POSITIVE(ins->vector_channels),
+                .channels = ins->vector_channels - 1,
                 .type = bi_pack_ldst_type(ins->dest_type),
                 .op = BIFROST_ADD_OP_LD_ATTR
         };
@@ -1370,7 +1370,7 @@ bi_pack_add_st_vary(bi_clause *clause, bi_instruction *ins, bi_registers *regs)
                 .src0 = bi_get_src(ins, regs, 1),
                 .src1 = bi_get_src(ins, regs, 2),
                 .src2 = bi_get_src(ins, regs, 3),
-                .channels = MALI_POSITIVE(ins->vector_channels),
+                .channels = ins->vector_channels - 1,
                 .op = BIFROST_ADD_OP_ST_VAR
         };