pan/midgard: Expose more typesize manipulation routines

These internal mir.c routines will help the RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-10-24 09:15:28 -04:00
parent 9bba182840
commit c1d36eb115
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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) {