From: Alyssa Rosenzweig Date: Thu, 24 Oct 2019 13:15:28 +0000 (-0400) Subject: pan/midgard: Expose more typesize manipulation routines X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1d36eb115351ce5b12332b5994be41fd7242644;p=mesa.git pan/midgard: Expose more typesize manipulation routines These internal mir.c routines will help the RA. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index e66424d0fd8..df930646b31 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -515,6 +515,8 @@ bool mir_is_written_before(compiler_context *ctx, midgard_instruction *ins, unsi uint16_t mir_bytemask_of_read_components(midgard_instruction *ins, unsigned node); unsigned mir_ubo_shift(midgard_load_store_op op); midgard_reg_mode mir_typesize(midgard_instruction *ins); +midgard_reg_mode mir_srcsize(midgard_instruction *ins, unsigned i); +unsigned mir_bytes_for_mode(midgard_reg_mode mode); uint16_t mir_from_bytemask(uint16_t bytemask, midgard_reg_mode mode); uint16_t mir_bytemask(midgard_instruction *ins); uint16_t mir_round_bytemask_down(uint16_t mask, midgard_reg_mode mode); diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index db26acd8cb1..fbb0120a2b2 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -384,7 +384,7 @@ mir_typesize(midgard_instruction *ins) /* Grabs the size of a source */ -static midgard_reg_mode +midgard_reg_mode mir_srcsize(midgard_instruction *ins, unsigned i) { /* TODO: 16-bit textures/ldst */ @@ -461,7 +461,7 @@ mir_to_bytemask(midgard_reg_mode mode, unsigned mask) /* ...and the inverse */ -static unsigned +unsigned mir_bytes_for_mode(midgard_reg_mode mode) { switch (mode) {