nir: add nir_type_conversion_op()
This function returns the nir_op corresponding to the conversion between the given nir_alu_type arguments. This function lacks support for integer-based types with bit_size != 32 and for float16 conversion ops. v2: - Improve readiness of the code and delete cases that don't happen now (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -699,6 +699,8 @@ nir_get_nir_type_for_glsl_type(const struct glsl_type *type)
|
||||
}
|
||||
}
|
||||
|
||||
nir_op nir_type_conversion_op(nir_alu_type src, nir_alu_type dst);
|
||||
|
||||
typedef enum {
|
||||
NIR_OP_IS_COMMUTATIVE = (1 << 0),
|
||||
NIR_OP_IS_ASSOCIATIVE = (1 << 1),
|
||||
|
Reference in New Issue
Block a user