diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-02-11 21:20:30 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-02-16 09:16:47 -0500 |
commit | 453c64663ce938952588325ba4c960bc63297582 (patch) | |
tree | 9b586400362ab6d9f7026ba19ebb5f1276b0b90e /src/panfrost/midgard/midgard_ops.c | |
parent | 9168e7a65deefae7bb8a40c583c205c408cbecab (diff) |
pan/midgard: Overhaul tag handling
We unify disparate metadata about tags into a single structure to ensure
information is not left out.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
Diffstat (limited to 'src/panfrost/midgard/midgard_ops.c')
-rw-r--r-- | src/panfrost/midgard/midgard_ops.c | 56 |
1 files changed, 17 insertions, 39 deletions
diff --git a/src/panfrost/midgard/midgard_ops.c b/src/panfrost/midgard/midgard_ops.c index 3df6e34fc99..cb0e50dfbff 100644 --- a/src/panfrost/midgard/midgard_ops.c +++ b/src/panfrost/midgard/midgard_ops.c @@ -255,43 +255,21 @@ struct mir_ldst_op_props load_store_opcode_props[256] = { #undef M32 #undef M64 -midgard_word_type midgard_word_types[16] = { - midgard_word_type_unknown, /* 0x0 */ - midgard_word_type_unknown, /* 0x1 */ - midgard_word_type_texture, /* 0x2 */ - midgard_word_type_texture, /* 0x3 */ - midgard_word_type_texture, /* 0x4 */ - midgard_word_type_load_store, /* 0x5 */ - midgard_word_type_unknown, /* 0x6 */ - midgard_word_type_unknown, /* 0x7 */ - midgard_word_type_alu, /* 0x8 */ - midgard_word_type_alu, /* 0x9 */ - midgard_word_type_alu, /* 0xA */ - midgard_word_type_alu, /* 0xB */ - midgard_word_type_alu, /* 0xC */ - midgard_word_type_alu, /* 0xD */ - midgard_word_type_alu, /* 0xE */ - midgard_word_type_alu, /* 0xF */ +struct mir_tag_props midgard_tag_props[16] = { + [TAG_INVALID] = {"invalid", 0}, + [TAG_BREAK] = {"break", 0}, + [TAG_TEXTURE_4_VTX] = {"tex/vt", 1}, + [TAG_TEXTURE_4] = {"tex", 1}, + [TAG_TEXTURE_4_BARRIER] = {"tex/bar", 1}, + [TAG_LOAD_STORE_4] = {"ldst", 1}, + [TAG_UNKNOWN_1] = {"unk1", 1}, + [TAG_UNKNOWN_2] = {"unk2", 1}, + [TAG_ALU_4] = {"alu/4", 1}, + [TAG_ALU_8] = {"alu/8", 2}, + [TAG_ALU_12] = {"alu/12", 3}, + [TAG_ALU_16] = {"alu/16", 4}, + [TAG_ALU_4_WRITEOUT] = {"aluw/4", 1}, + [TAG_ALU_8_WRITEOUT] = {"aluw/8", 2}, + [TAG_ALU_12_WRITEOUT] = {"aluw/12", 3}, + [TAG_ALU_16_WRITEOUT] = {"aluw/16", 4} }; - -unsigned midgard_word_size[16] = { - 0, /* 0x0 */ - 0, /* 0x1 */ - 1, /* 0x2 */ - 1, /* 0x3 */ - 1, /* 0x4 */ - 1, /* 0x5 */ - 0, /* 0x6 */ - 0, /* 0x7 */ - 1, /* 0x8 */ - 2, /* 0x9 */ - 3, /* 0xA */ - 4, /* 0xB */ - 1, /* 0xC */ - 2, /* 0xD */ - 3, /* 0xE */ - 4, /* 0xF */ -}; - - - |