From: Francisco Jerez Date: Tue, 26 Apr 2016 00:25:48 +0000 (-0700) Subject: i965/fs: Add (sub)reg_offset asserts to brw_reg_from_fs_reg. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=437e65f9d93f8df0e6aaf1bcaf74c6a211498db8;p=mesa.git i965/fs: Add (sub)reg_offset asserts to brw_reg_from_fs_reg. These are completely ignored by the conversion to brw_reg, so they better be zero. Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 4ca3dad866c..93a95198843 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -56,6 +56,7 @@ brw_file_from_reg(fs_reg *reg) static struct brw_reg brw_reg_from_fs_reg(fs_inst *inst, fs_reg *reg, unsigned gen, bool compressed) { + assert(reg->reg_offset == 0); struct brw_reg brw_reg; switch (reg->file) { @@ -103,6 +104,7 @@ brw_reg_from_fs_reg(fs_inst *inst, fs_reg *reg, unsigned gen, bool compressed) case ARF: case FIXED_GRF: case IMM: + assert(reg->subreg_offset == 0); brw_reg = reg->as_brw_reg(); break; case BAD_FILE: