[Mesa-dev] [PATCH v2 035/103] i965/vec4: fix optimize predicate for doubles
Iago Toral Quiroga
itoral at igalia.com
Tue Oct 11 09:01:39 UTC 2016
---
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 c0cb141..088ed13 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1010,8 +1010,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.7.4
More information about the mesa-dev
mailing list