From 8f9ce5fa22c04b5b34aa6dc67e4a9b2d151d293d Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 18 Feb 2016 09:24:16 +0100 Subject: [PATCH] i965/vec4: fix optimize predicate for doubles Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 ++++-- 1 file 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); -- 2.30.2