diff options
author | Jason Ekstrand <[email protected]> | 2020-03-30 12:06:22 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-31 00:18:05 +0000 |
commit | 842338e2f0bdf2b7025f2d29851aa90dd2106777 (patch) | |
tree | 9e64bb02d1e476e81b09901255131565ab1d78ed /src | |
parent | 84ab61160a18edab0e1698e1e54e560b57d5a9ab (diff) |
nir: Add a nir_op_is_vec helper
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 6a1a8e175df..5d29b2f64cc 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1055,6 +1055,22 @@ nir_op_vec(unsigned components) } static inline bool +nir_op_is_vec(nir_op op) +{ + switch (op) { + case nir_op_mov: + case nir_op_vec2: + case nir_op_vec3: + case nir_op_vec4: + case nir_op_vec8: + case nir_op_vec16: + return true; + default: + return false; + } +} + +static inline bool nir_is_float_control_signed_zero_inf_nan_preserve(unsigned execution_mode, unsigned bit_size) { return (16 == bit_size && execution_mode & FLOAT_CONTROLS_SIGNED_ZERO_INF_NAN_PRESERVE_FP16) || |