diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-21 12:26:42 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-22 01:01:17 +0000 |
commit | f85746af3587bfaa9f9be0a12792e73f63d10258 (patch) | |
tree | 0978f707405eb386ef935e8c618bc1c13cc27cbe /src | |
parent | 93be49b14bcd15b2c6e056a8499c435dc1bbd182 (diff) |
pan/bi: Add normal/compact/dual switch to IR
For tex.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bi_print.c | 13 | ||||
-rw-r--r-- | src/panfrost/bifrost/bi_print.h | 1 | ||||
-rw-r--r-- | src/panfrost/bifrost/compiler.h | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 5f718e95a37..202cbc0fb0e 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -304,6 +304,17 @@ bi_frexp_op_name(enum bi_frexp_op op) } } +const char * +bi_tex_op_name(enum bi_tex_op op) +{ + switch (op) { + case BI_TEX_NORMAL: return "normal"; + case BI_TEX_COMPACT: return "compact"; + case BI_TEX_DUAL: return "dual"; + default: return "invalid"; + } +} + static void bi_print_load_vary(struct bi_load_vary *load, FILE *fp) { @@ -395,6 +406,8 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) fprintf(fp, ".loc%u", ins->blend_location); else if (ins->type == BI_STORE || ins->type == BI_STORE_VAR) fprintf(fp, ".v%u", ins->store_channels); + else if (ins->type == BI_TEX) + fprintf(fp, ".%s", bi_tex_op_name(ins->op.texture)); if (ins->dest) bi_print_alu_type(ins->dest_type, fp); diff --git a/src/panfrost/bifrost/bi_print.h b/src/panfrost/bifrost/bi_print.h index 76350449547..dfc916a593c 100644 --- a/src/panfrost/bifrost/bi_print.h +++ b/src/panfrost/bifrost/bi_print.h @@ -44,6 +44,7 @@ const char * bi_special_op_name(enum bi_special_op op); const char * bi_table_op_name(enum bi_table_op op); const char * bi_reduce_op_name(enum bi_reduce_op op); const char * bi_frexp_op_name(enum bi_frexp_op op); +const char * bi_tex_op_name(enum bi_tex_op op); void bi_print_instruction(bi_instruction *ins, FILE *fp); void bi_print_bundle(bi_bundle *bundle, FILE *fp); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 96be391ca35..1cbb211b778 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -214,6 +214,12 @@ enum bi_special_op { BI_SPECIAL_EXP2_LOW, }; +enum bi_tex_op { + BI_TEX_NORMAL, + BI_TEX_COMPACT, + BI_TEX_DUAL +}; + typedef struct { struct list_head link; /* Must be first */ enum bi_class type; @@ -275,6 +281,7 @@ typedef struct { enum bi_table_op table; enum bi_frexp_op frexp; enum bi_cond compare; + enum bi_tex_op texture; /* For FMA/ADD, should we add a biased exponent? */ bool mscale; |