diff options
author | Iago Toral Quiroga <[email protected]> | 2016-02-18 09:24:16 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2017-01-03 11:26:50 +0100 |
commit | 8f9ce5fa22c04b5b34aa6dc67e4a9b2d151d293d (patch) | |
tree | 5d84c8b752b21278fed9346215e42bf67cf861d7 /src | |
parent | 1816ae8f68e395da26dcfea2539bafd715c8dbc4 (diff) |
i965/vec4: fix optimize predicate for doubles
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index b630e3f5fd4..8c9b98347bf 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -1003,8 +1003,10 @@ vec4_visitor::optimize_predicate(nir_alu_instr *instr, src_reg op[2]; assert(nir_op_infos[cmp_instr->op].num_inputs == 2); for (unsigned i = 0; i < 2; i++) { - op[i] = get_nir_src(cmp_instr->src[i].src, - nir_op_infos[cmp_instr->op].input_types[i], 4); + nir_alu_type type = nir_op_infos[cmp_instr->op].input_types[i]; + unsigned bit_size = nir_src_bit_size(cmp_instr->src[i].src); + type = (nir_alu_type) (((unsigned) type) | bit_size); + op[i] = get_nir_src(cmp_instr->src[i].src, type, 4); unsigned base_swizzle = brw_swizzle_for_nir_swizzle(cmp_instr->src[i].swizzle); op[i].swizzle = brw_compose_swizzle(size_swizzle, base_swizzle); |