Mesa (main): nir: define NIR_ALU_MAX_INPUTS
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 4 19:59:19 UTC 2021
Module: Mesa
Branch: main
Commit: 90a5fef85cb2b3157f435b1fcf453165a69a7d2c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90a5fef85cb2b3157f435b1fcf453165a69a7d2c
Author: Hoe Hao Cheng <haochengho12907 at gmail.com>
Date: Fri Jun 4 02:48:59 2021 +0800
nir: define NIR_ALU_MAX_INPUTS
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11172>
---
src/compiler/nir/nir.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index c89663575e7..cedbc5bb32b 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1338,6 +1338,11 @@ typedef enum {
NIR_OP_IS_ASSOCIATIVE = (1 << 1),
} nir_op_algebraic_property;
+/* vec16 is the widest ALU op in NIR, making the max number of input of ALU
+ * instructions to be the same as NIR_MAX_VEC_COMPONENTS.
+ */
+#define NIR_ALU_MAX_INPUTS NIR_MAX_VEC_COMPONENTS
+
typedef struct {
const char *name;
@@ -1372,14 +1377,14 @@ typedef struct {
/**
* The number of components in each input
*/
- uint8_t input_sizes[NIR_MAX_VEC_COMPONENTS];
+ uint8_t input_sizes[NIR_ALU_MAX_INPUTS];
/**
* The type of vector that each input takes. Note that negate and
* absolute value are only allowed on inputs with int or float type and
* behave differently on the two.
*/
- nir_alu_type input_types[NIR_MAX_VEC_COMPONENTS];
+ nir_alu_type input_types[NIR_ALU_MAX_INPUTS];
nir_op_algebraic_property algebraic_properties;
More information about the mesa-commit
mailing list