Found while running shader-db under valgrind.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
channels_remaining = -1;
continue;
}
- dst_reg_offset[offset] = inst->dst.offset / REG_SIZE;
- if (inst->size_written > REG_SIZE)
- dst_reg_offset[offset + 1] = inst->dst.offset / REG_SIZE + 1;
+ for (unsigned i = 0; i < MAX2(inst->size_written / REG_SIZE, 1); i++)
+ dst_reg_offset[offset + i] = inst->dst.offset / REG_SIZE + i;
mov[offset] = inst;
channels_remaining -= regs_written(inst);
}