pan/bi: Add a bifrost_roundmode field

And a class property signaling it's okay to use.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
This commit is contained in:
Alyssa Rosenzweig
2020-03-02 20:52:36 -05:00
committed by Marge Bot
parent bbf41ffb00
commit d69bf8db62
2 changed files with 8 additions and 2 deletions

View File

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

View File

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