diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-02 20:52:36 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-05 14:35:38 +0000 |
commit | d69bf8db6217b7309ea7a7aec8139c8151b39f3c (patch) | |
tree | 74c54345cc176f455f104db3931204980e79e6cb /src/panfrost | |
parent | bbf41ffb00d8d78db1cf43403ab7f6af5a2f9ec3 (diff) |
pan/bi: Add a bifrost_roundmode field
And a class property signaling it's okay to use.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/bifrost/bi_tables.c | 4 | ||||
-rw-r--r-- | src/panfrost/bifrost/compiler.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/panfrost/bifrost/bi_tables.c b/src/panfrost/bifrost/bi_tables.c index 0681fbad00d..c1acd379d22 100644 --- a/src/panfrost/bifrost/bi_tables.c +++ b/src/panfrost/bifrost/bi_tables.c @@ -36,7 +36,7 @@ unsigned bi_class_props[BI_NUM_CLASSES] = { [BI_CONVERT] = 0, [BI_CSEL] = 0, [BI_DISCARD] = 0, - [BI_FMA] = 0, + [BI_FMA] = BI_ROUNDMODE, [BI_FREXP] = 0, [BI_LOAD] = 0, [BI_LOAD_ATTR] = 0, @@ -49,5 +49,5 @@ unsigned bi_class_props[BI_NUM_CLASSES] = { [BI_STORE_VAR] = 0, [BI_SPECIAL] = 0, [BI_TEX] = 0, - [BI_ROUND] = BI_GENERIC, + [BI_ROUND] = BI_GENERIC | BI_ROUNDMODE, }; diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 823d2e7bc24..421db9afb7f 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -83,6 +83,9 @@ extern unsigned bi_class_props[BI_NUM_CLASSES]; * irregular enough to warrant a separate class */ #define BI_GENERIC (1 << 1) +/* Accepts a bifrost_roundmode */ +#define BI_ROUNDMODE (1 << 2) + /* It can't get any worse than csel4... can it? */ #define BIR_SRC_COUNT 4 @@ -100,6 +103,9 @@ typedef struct { enum bifrost_outmod outmod; bool src_abs[BIR_SRC_COUNT]; bool src_neg[BIR_SRC_COUNT]; + + /* Round mode (requires BI_ROUNDMODE) */ + enum bifrost_roundmode roundmode; } bi_instruction; typedef struct { |