i965/fs: Don't rely on the default builder to create a null register in emit_spill.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 27 Jul 2015 17:14:41 +0000 (20:14 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Jul 2015 11:15:10 +0000 (14:15 +0300)
It's not guaranteed to have the same width as the instruction
generating the spilled variable.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp

index f25f2ecce75631ebb2bcf66a29ceaaf6950daba9..6a7ed64415dccf8559f24d7e09c7c9c3aa380315 100644 (file)
@@ -738,7 +738,7 @@ fs_visitor::emit_spill(bblock_t *block, fs_inst *inst, fs_reg src,
 
    for (int i = 0; i < count / reg_size; i++) {
       fs_inst *spill_inst =
-         ibld.emit(SHADER_OPCODE_GEN4_SCRATCH_WRITE, bld.null_reg_f(), src);
+         ibld.emit(SHADER_OPCODE_GEN4_SCRATCH_WRITE, ibld.null_reg_f(), src);
       src.reg_offset += reg_size;
       spill_inst->offset = spill_offset + i * reg_size * REG_SIZE;
       spill_inst->mlen = 1 + reg_size; /* header, value */