i965/vec4: fix register allocation for 64-bit undef sources
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 15 Feb 2016 09:07:42 +0000 (10:07 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:50 +0000 (11:26 +0100)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp

index 67b6b32cfded1d0baec1c5da2efad2f4f32430d7..3611f8c73237903bed28ce4f1ae4606e457b5880 100644 (file)
@@ -2080,7 +2080,8 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
 void
 vec4_visitor::nir_emit_undef(nir_ssa_undef_instr *instr)
 {
-   nir_ssa_values[instr->def.index] = dst_reg(VGRF, alloc.allocate(1));
+   nir_ssa_values[instr->def.index] =
+      dst_reg(VGRF, alloc.allocate(DIV_ROUND_UP(instr->def.bit_size, 32)));
 }
 
 }