diff options
author | Iago Toral Quiroga <[email protected]> | 2015-11-06 11:19:58 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-04-11 08:27:04 +0200 |
commit | 12f628adcbe2f87073fb06f98a98414b898cde5d (patch) | |
tree | 5cd984c95df4d92bfba29ea587ff5d23b94cb99b | |
parent | 3663a2397e47da9b766b0c4239a8b74ac77b5d04 (diff) |
nir/lower_to_source_mods: Handle different bit sizes
v2 (Sam):
- Use helper to get base type from nir_alu_type.
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_lower_to_source_mods.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_to_source_mods.c b/src/compiler/nir/nir_lower_to_source_mods.c index 6c4e1f0d3f3..1e8c3c2a130 100644 --- a/src/compiler/nir/nir_lower_to_source_mods.c +++ b/src/compiler/nir/nir_lower_to_source_mods.c @@ -54,7 +54,7 @@ nir_lower_to_source_mods_block(nir_block *block, void *state) if (parent->dest.saturate) continue; - switch (nir_op_infos[alu->op].input_types[i]) { + switch (nir_alu_type_get_base_type(nir_op_infos[alu->op].input_types[i])) { case nir_type_float: if (parent->op != nir_op_fmov) continue; @@ -128,7 +128,8 @@ nir_lower_to_source_mods_block(nir_block *block, void *state) continue; /* We can only saturate float destinations */ - if (nir_op_infos[alu->op].output_type != nir_type_float) + if (nir_alu_type_get_base_type(nir_op_infos[alu->op].output_type) != + nir_type_float) continue; if (!list_empty(&alu->dest.dest.ssa.if_uses)) |