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;