pan/bi: Add normal/compact/dual switch to IR

For tex.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671>
This commit is contained in:
Alyssa Rosenzweig 2020-04-21 12:26:42 -04:00 committed by Marge Bot
parent 93be49b14b
commit f85746af35
3 changed files with 21 additions and 0 deletions

View file

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

View file

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

View file

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