diff options
author | Samuel Iglesias Gonsálvez <siglesias@igalia.com> | 2016-12-07 08:34:42 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <siglesias@igalia.com> | 2017-01-09 09:10:13 +0100 |
commit | 27cf6a369fcec15a9f65837507f57dbd8bdfaaaa (patch) | |
tree | b77a86495b85fe83f02bb7a9e9dd504f90738637 /src/compiler/nir/nir.h | |
parent | 3a571fcc43e70731417f0b81cbce4b0a0c1be71d (diff) |
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>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 654a26728a..c9226e94dd 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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), |