diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-02 20:46:37 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-05 14:35:38 +0000 |
commit | 34165c7ec0fb3a0a07f3a1ede833b8bbf336e44a (patch) | |
tree | 05ddd3c044960ab9fe7d25b9d1b9e8c3847ca3bb /src | |
parent | 29acd7bd8e50ac83aeeb68471f516ed6525aae99 (diff) |
pan/bi: Add BI_GENERIC property
I don't want to have 20 class-specific structures floating around. So
let's derive them all from a common generic ALU type.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bi_tables.c | 10 | ||||
-rw-r--r-- | src/panfrost/bifrost/compiler.h | 5 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/panfrost/bifrost/bi_tables.c b/src/panfrost/bifrost/bi_tables.c index 914acd1e218..0681fbad00d 100644 --- a/src/panfrost/bifrost/bi_tables.c +++ b/src/panfrost/bifrost/bi_tables.c @@ -27,12 +27,12 @@ #include "compiler.h" unsigned bi_class_props[BI_NUM_CLASSES] = { - [BI_ADD] = BI_MODS, + [BI_ADD] = BI_GENERIC | BI_MODS, [BI_ATEST] = 0, [BI_BRANCH] = 0, - [BI_CMP] = BI_MODS, + [BI_CMP] = BI_GENERIC | BI_MODS, [BI_BLEND] = 0, - [BI_BITWISE] = 0, + [BI_BITWISE] = BI_GENERIC, [BI_CONVERT] = 0, [BI_CSEL] = 0, [BI_DISCARD] = 0, @@ -42,12 +42,12 @@ unsigned bi_class_props[BI_NUM_CLASSES] = { [BI_LOAD_ATTR] = 0, [BI_LOAD_VAR] = 0, [BI_LOAD_VAR_ADDRESS] = 0, - [BI_MINMAX] = 0, + [BI_MINMAX] = BI_GENERIC, [BI_MOV] = BI_MODS, [BI_SHIFT] = 0, [BI_STORE] = 0, [BI_STORE_VAR] = 0, [BI_SPECIAL] = 0, [BI_TEX] = 0, - [BI_ROUND] = 0, + [BI_ROUND] = BI_GENERIC, }; diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 6956a99665c..823d2e7bc24 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -78,6 +78,11 @@ extern unsigned bi_class_props[BI_NUM_CLASSES]; /* abs/neg/outmod valid for a float op */ #define BI_MODS (1 << 0) +/* Generic enough that little class-specific information is required. In other + * words, it acts as a "normal" ALU op, even if the encoding ends up being + * irregular enough to warrant a separate class */ +#define BI_GENERIC (1 << 1) + /* It can't get any worse than csel4... can it? */ #define BIR_SRC_COUNT 4 |