From: Iago Toral Quiroga Date: Fri, 12 Feb 2016 07:47:21 +0000 (+0100) Subject: i965/vec4: fix get_nir_dest() to use DF type for 64-bit destinations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8318b120e53518ae4d933acd876b8dbd3871e0c;p=mesa.git i965/vec4: fix get_nir_dest() to use DF type for 64-bit destinations v2: Make dst_reg_for_nir_reg() handle this for nir_register since we want to have the correct type set before we call offset(). Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index f69c14d9721..67b6b32cfde 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -259,6 +259,8 @@ dst_reg_for_nir_reg(vec4_visitor *v, nir_register *nir_reg, dst_reg reg; reg = v->nir_locals[nir_reg->index]; + if (nir_reg->bit_size == 64) + reg.type = BRW_REGISTER_TYPE_DF; reg = offset(reg, 8, base_offset); if (indirect) { reg.reladdr = @@ -275,6 +277,8 @@ vec4_visitor::get_nir_dest(const nir_dest &dest) if (dest.is_ssa) { dst_reg dst = dst_reg(VGRF, alloc.allocate(DIV_ROUND_UP(dest.ssa.bit_size, 32))); + if (dest.ssa.bit_size == 64) + dst.type = BRW_REGISTER_TYPE_DF; nir_ssa_values[dest.ssa.index] = dst; return dst; } else {