diff options
author | Hoe Hao Cheng <haochengho12907@gmail.com> | 2021-06-04 02:48:59 +0800 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-06-04 19:33:13 +0000 |
commit | 90a5fef85cb2b3157f435b1fcf453165a69a7d2c (patch) | |
tree | 642ee9858674db6f22ddf086a96c0979f8a86148 /src/compiler | |
parent | d6d7421e9842853210c7ab35e2e750dd611ff895 (diff) |
nir: define NIR_ALU_MAX_INPUTS
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11172>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir.h | 9 |
1 files 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; |